devcartel / pyrfa

Open sourced Python API for Refinitiv (Thomson Reuters) Enterprise Platform.
http://devcartel.com/pyrfa
MIT License
50 stars 15 forks source link

Why the data confused once several RICs were asked #40

Open hzadonis opened 6 years ago

hzadonis commented 6 years ago

Hi, Masters: I'm using pyrfa to subscribe data from TREP. Once I subscribe server RICs, in this case, such as 300570.SZ and 600519.SH. I found my program sometimes confused the price provider. Such as: Line1: QList(['2018-06-06T05:05:24.000000000'], dtype='datetime64[ns]'), QList([b'600519'], dtype='|S9'), QList([798.8], dtype=float32), QList([100]), QList([798.88], dtype=float32), QList([400])] Line2:[QList(['2018-06-06T05:05:27.000000000'], dtype='datetime64[ns]'), QList([b'300570'], dtype='|S9'), QList([798.67], dtype=float32), QList([400]), QList([798.88], dtype=float32), QList([400])] Line1 from 600519.SH is right, but Line2 should come from 300570.SZ

Could you please give some suggestion how to fix the problem? Thanks!

Regards Zheng

wiwat-tharateeraparb commented 6 years ago

Hi, not sure how’s your program parse and cache the data from pyrfa though as we don’t see your code here. My guess is that the data is in incremental updates and you probably didn’t clear the previous value from previous update.

hzadonis commented 6 years ago

This was caused while I asked several RICs, the data package input from TREP, I can't tell which package belongs to which RIC. Then confusion occurred.

hzadonis commented 6 years ago

Yes, not clear is a problem, let me try it. Thanks!

hzadonis commented 6 years ago

Thanks! it was caused not clear the initial data after every update data package passed.