dwx-zeromq-connector
dwx-zeromq-connector copied to clipboard
[Potential Bug] Subscribing to Multiple Symbols
Hi I am attempting to subscribe to more than one symbols at the same time.
First I try:
_zmq._DWX_MTX_SUBSCRIBE_MARKETDATA_('EURUSD')
Then I attempt to subscribe to ADD a different symbol by:
_zmq._DWX_MTX_SUBSCRIBE_MARKETDATA_('GBPUSD')
Nothing happens. After I unsubscribe from EURUSD then I see the GBPUSD results:
_zmq._DWX_MTX_UNSUBSCRIBE_MARKETDATA_('EURUSD')
So when subscribed to multiple symbols, only one symbol is displayed on the screen, while the expected behaviour is to see all the subscribed symbols.
Also what would be the best way to transfer these subscribed multiple symbols to SQL database for example?
It looks like it is impossible to subscribe to multiple symbols at the same time, as subscribing is based on zmq.socket.setsockopt(zmq.SUBSCRIBE, topicfilter). If one wants to subscribe to two symbols with _zmq.DWX_MTX_SUBSCRIBE_MARKETDATA(SYMBOL_2), what happens is the TOPIC FILTER is updated with a new filter and there is only one SYMBOL being captured in _zmq._Market_Data_DB This can be validated with _zmq._Market_Data_DB[SYMBOL_1].len() and _zmq._Market_Data_DB[SYMBOL_2].len() After updating the filter, the LEN of captured entries for SYMBOL_1 remains the fixed. It contradicts to what is described here: https://youtu.be/3nM0c2kG_Sw?t=2034
reopening issue
Thank you for raising this @octopyth 👍
We'll try to reproduce this internally and patch the code as necessary.
Many thanks for your due diligence!
same issue. only one symbol in same time. the first subscribed symbol can be freeze.