Keyboard Shortcuts
Likes
Search
Number of market data lines used by streaming market data
Only the market depth API ?mentions how the number of simultaneous L2 requests relate to the number of market data lines available to a user. What about the reqRealTimeBars - it mentions the limitation of the number of API requests (60 per 600 seconds) but doesn't tell how many market data lines each stream would use. Is it just 1, so 100 simultaneous symbols can be streamed if the user has 100 market data lines? Also what about reqHistoricalTicks ?and reqTickByTickData??? Do they also have only the API request throttling and 100 tickers can be streamed simultaneously? I was getting market data lines exceeded error with just 3 simultaneous streams however, when using? reqTickByTickData. But I can't find any documentation on the same. It appears from practice all of these API streaming requests only allow 3 simultaneous streams just like the L2 streaming, which is the only place that documents how many simultaneous streams are allowed for a given number of market data lines.
|
toggle quoted message
Show quoted text
From: [email protected] <[email protected]> on behalf of kannan.jayaprakasam@... <kannan.jayaprakasam@...>
Sent: Saturday, June 10, 2023 12:39:53 AM To: [email protected] <[email protected]> Subject: [TWS API] Number of market data lines used by streaming market data ?
Only the market depth API ?mentions how the number of simultaneous L2 requests relate to the number of market data lines available to a user. What about the reqRealTimeBars - it mentions the limitation of the number of
API requests (60 per 600 seconds) but doesn't tell how many market data lines each stream would use. Is it just 1, so 100 simultaneous symbols can be streamed if the user has 100 market data lines? Also what about reqHistoricalTicks
?and reqTickByTickData???
Do they also have only the API request throttling and 100 tickers can be streamed simultaneously? I was getting market data lines exceeded error with just 3 simultaneous streams however, when using? reqTickByTickData. But I can't find any documentation on
the same. It appears from practice all of these API streaming requests only allow 3 simultaneous streams just like the L2 streaming, which is the only place that documents how many simultaneous streams are allowed for a given number of market data lines.
|
The limits for real time data subscriptions are driven by the "data lines" concept and are very different from and and not related to the "60 requests per 600" seconds limit for historical data downloads. Subscription requests for real time data streams have to comply with the global API rate limit of 50 requests of any type per second, though. V10 versions of TWS/IBGW throttle your requests automatically at that level (though you can switch that off) while V9 versions will refuse requests above that rate with a "pacing violation" error. There is no limit on the number of responses from TWSAPI for all your real-time subscriptions combined. You can find a little more detail in a recent post about message volume from data subscriptions. You are correct in that all accounts are allowed to have at least "100 concurrent lines of real-time market data" unless the accounts have high balances (> $1Mio) generate a lot of commissions (>$800 per month), or purchase up to 10 booster packs which add 100 lines per pack for a maximum of 1,100 lines per account. You can find more detail at . data, as you found correctly, is capped at 3 simultaneous subscription unless you have 400 or more market lines. At 400 lines or more it is one subscription per 100 data lines. The documentation says in the first paragraph that "The maximum number of simultaneous tick-by-tick subscriptions allowed for a user is determined by the same formula used to calculate maximum number of market depth subscriptions ". At least V9 versions of TWS/IBGW did enforce the limit of three TickByTick subscriptions at 100 data lines, but we have seen that more recent V10 versions seem to relax that a little to five. Also, the TickByTick data limits are applied to the number of instruments that you stream, not the number of actual streams. In other words we stream TickByTickLast, TickByTickBidAsk, and TickByTickMidPoint each for five different instruments for a total of 15 streams. Each subscription counts as one data line, so you could have up to 100 simultaneously. And one last thing. Real time data lines are shared between TWS and the API. The combined total cannot exceed your limit (say 100). But you will use only one data line for each instrument that TWS and your API client(s) subscribe to simultaneously. Hope that helps, ´³¨¹°ù²µ±ð²Ô |