Interactive Brokers TWS API message code
Interactive Brokers TWS API message code: 456 (max number of)
The error, as text you can copy
456- Kind
- TWS API message code
- Where you meet it
- In the TWS API, not in the Web API and not in an HTTP status
What does 456 (max number of) mean on the Interactive Brokers API?
Listed by the vendor as "Max number of real time requests has been reached". The words in quotes are from Interactive Brokers' own list. The vendor's note ties it to the maximum number of concurrent market data lines.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
How do I fix 456 (max number of)?
Cancel real time requests you no longer need so that you stay within your market data lines. The page gives no other remedy.
Interactive Brokers limits behind this error
This is a rate or allowance error, so these are the limits recorded for Interactive Brokers, each with its scope and source. Pace your requests against them.
| Limit | Value | Scope | Source |
|---|---|---|---|
| Global requests a second (Web API) | 10 | Per authenticated username, that is per Web API session | ibkrcampus.comchecked corroborated by interactivebrokers.com/docs/web-api/trading/usage-and-availability/pacing-limitations |
| Historical market data requests | Either 10 req/s or 50 req/minute, as the page words it | GET /iserver/marketdata/history only | interactivebrokers.comchecked corroborated by ibkrcampus.com/campus/ibkr-api-page/webapi-doc/ |
| Market data snapshot requests a second | 10 | GET /iserver/marketdata/snapshot only | interactivebrokers.comchecked corroborated by ibkrcampus.com/campus/ibkr-api-page/webapi-doc/ |
| Order and trade list requests | 1 req/5 s | GET /iserver/orders and GET /iserver/trades, each counted on its own | interactivebrokers.comchecked corroborated by ibkrcampus.com/campus/ibkr-api-page/webapi-doc/ |
| Session validation requests a minute | 1 | GET /sso/validate only | interactivebrokers.comchecked corroborated by ibkrcampus.com/campus/ibkr-api-page/webapi-doc/ |
| Session keep alive requests a second | 1 | GET /tickle only | interactivebrokers.comchecked corroborated by ibkrcampus.com/campus/ibkr-api-page/webapi-doc/ |