开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: Building a real time feed: reqMktData vs reqHistoricalData vs reqRealTimeBars (with keepUpToDate=True)


 

I don't completely follow your suggestions, but you may misunderstand the TWS API capabilities.

You are correct in that one TWS/IBGW supports connections from up to 32 client applications simultaneously, but each of these clients can subscribe to as many real-time feeds as your market data subscriptions allow:
  • The basic subscription limit is 100 different instruments, and subscriptions to different data feeds for the same instrument count only once against that limit (say, reqMktData, reqRealTimeBars, reqTickByTikLast, reqTickByTokBidAsk for the same instrument)
  • The limit of simultaneous subscriptions per client application can be increased considerably (beyond 1,000) in case your account has certain value levels, you generate significant commissions, or you purchase booster packs.
  • And you can run multiple TWS/IBGW instances on the same machine (just not with the same user/password), but that is not necessary for real-time market data subscriptions.

For my taste, reqRealTimeBars is the best approach for the requirements @jplem presented. reqHistoricalData with keepUpToDate=True is not a real-time feed, comes from a Historical Market Data farm instead, frequently sends multiple "bars in progress", occasionally sends funny data (as jplem already found out), and does not get automatically reconnected upon network outages throughout the day or nightly resets. reqRealTimeBars, for very liquid instruments, sends bars even for 5 second periods with no activity and can be used as a great no-overhead "are you still alive" monitor.

So you'll need only one client application with one TWS/IBGW connection if you want to create a real-time streaming "ticker-tape" that records all events for 10 instruments in the order they arrive. And as I said before even with so most basic market data subscriptions, that client application can do that for up to 100 instruments.

闯ü谤驳别苍
?
On Sun, Mar 16, 2025 at 02:46 PM, <hellemory612@...> wrote:

Also interested. By the way, I like the case that on one single machine, I can monitor real-time streaming for multiple symbols ( for example, 10 symbols) at the same time.
(a) I understand that one account (for example, paper trading or real account), one can monitor one real-time data.
(b)
?It is possible to have multiple TWS instances running on the same computer if each is configured with a different API socket port number. Also, each TWS session can receive up to?32 different client applications?simultaneously
?
------
seems the only way I can do this is: every time, I disconnect one real-time live stream of one symbol, then go to next symbol.
Best and thanks,

Join [email protected] to automatically receive all group messages.