Streaming data and snapshot working simultaneously


We have a cron job to collect snapshot data for around 20 tickers every day at certain hour.

Now, we want to collect AuctionPrice and AuctionVolume fields for another 30 different tickers, at the same time. As these fields are not supported for snapshots, we are using streaming data instead in this case.

Streaming data works fine. But the snapshot job fails when streaming data is active. This is the error we receive:

{’‘status’’: ‘‘error’’, ‘‘msg’’: ‘‘cannot collect market data snapshot because there
are already active market data collections, please cancel all active collections for ib vendor and try again’’})’

The total amount of tickers is around 60 and we even have a few Quote Boosters.

I guess one possible solution could be if we execute a single data streaming for the whole list of tickers, but we would prefer to keep using the snapshot code.
Is there any way to get streaming data and snapshots working simultaneously?


Using streaming would be my advice. It’s pretty easy to replicate snapshots with streaming. Collect, run an aggregate db for convenience, and query the aggregate. The streaming API is very flexible. You can request different fields for different sets of tickers via different API calls and save them to different databases. So you don’t need to combine all tickers into one list and one API call.

While it would probably be possible to run a second realtime service to allow snapshots and streaming at the same time, that’s not officially supported and would have to be handled under paid support. If your preference for snapshots is simply that you’ve already implemented it that way, any solution to allow snapshots and streaming at the same time will undoubtedly be more work than simply switching to all streaming.

1 Like