Error code 200, "No security definition has been found for the request" occurs when a security cannot be found in IB's system. Common reasons for this error:
Reason | Resolution |
---|---|
Stock delisted (due to bankrupty, M&A, etc.) | IB does not provide data for delisted tickers; you can delist the security in QuantRocket which will cause QuantRocket to stop requesting new data for it. Existing data will be preserved and remain available for research and backtesting. |
Stock switched exchanges | When a stock switches exchanges, IB sometimes issues a new ConId. Since QuantRocket requests data by ConId, error code 200 occurs for the old ConId. If the security still exists under a new ConId, you can delist the old conid and fetch the new listing. |
Option contract expired | IB does not provide data for expired options. |
Futures contract expired more than 2 years ago | IB only keeps futures contracts in their system for 2 years. |
Spotty network | Occasionally error code 200 occurs when the network connection is spotty. If you see network-related errors in the logs alongside error 200, see if error 200 goes away when you try again later. |
Invalid exchange | Error code 200 can occur with a valid ConId if the exchange is invalid. The exchange is provided by QuantRocket in market data requests to indicate the exchange for which data should be returned, and is provided by you when placing orders to indicate which exchange to route the order to. If this error occurs in the blotter you should check the exchange; if it occurs in a service where you didn't pick the exchange, and it's not due to a spotty network, and the ConId appears to be valid according to the IB search tool below, please report this on the forum as a possible bug. |
IB provides a Contract Search tool which may be useful for looking up securities.