¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

reqHistoricalData() for OTC only works if first typed symbol in TWS


 


reqHistoricalData() (I'm using Java) only returns results if the symbol is first typed into the TWS platform.? I appear to have this issue only with OTC stocks.? For example, my software can call?reqHistoricalData() all it wants but the?historicalData() callback is never called until I go to TWS and manually type in the symbol the software is looking for.? The next call then produces the proper callback.

Any ideas?

Thanks!


 

The plot thickens.? Found this in the TWS API docs:

"For instance, a historical data request for a pink sheet (OTC) stock which trades on ARCAEDGE will require the subscription "OTC Global Equities" or "Global OTC Equities and OTC Markets" for ARCAEDGE in addition to the regular subscription (e.g. "OTC Markets")"

You must have the "OTC Markets" and "OTC Global Equities" subscriptions.? "OTC Markets" is not included in the "US Securities Snapshot and Futures Value Bundle" even though it says, "...?and OTC Markets quotes".? ?Apparently being able to receive a quote is not the same as receiving market data.

But this doesn't cover everything.? A contract search for the stock AAIGF returns nothing.? What subscription is needed for this?? The "Market Data Assistant" is unable to find anything for this symbol yet Think or Swim over at TD Ameritrade pulls it up.


 

I was having the same problem with BAYRY (PINK.CURRENT).? Just adding the symbol to TWS didn't solve the problem.? I had to first add the symbol to TWS and then ask TWS to generate a chart.? I'm also using Java.
I will see if the fix persists tomorrow and provide an update.


 

So it seems that the fix I described above does not persist.? If I first pull up a chart in TWS then I can download data (e.g. SIEGY (PINK.CURRENT)).? Otherwise, I get "error: tid: 5006, errorCode: 162, msg: Historical Market Data Service error message:No market data permissions for ARCAEDGE STK".


 

IB says in their TWS API documentation that the intended use of the API is not as a data provider.? That continues to show itself to be true.? I use polygon.io for data and IB for trade executions, but polygon is not yet offering OTC data.? So at this time I'm going to keep it simple and use IB only for trade executions.


 

¿ªÔÆÌåÓý

May I know what restrictions or issues the TWS API has that prevents it from being a data provider? Having a dedicated data source is fine - but adds another dependency for an auto trading system...




IB says in their TWS API documentation that the intended use of the API is not as a data provider.? That continues to show itself to be true.?


 

The limitation is that interactive brokers is a broker, not a data provider. You can pull data, but it's not worth the headache to me, because everything IBKR does is centered around their core business, which is that of a broker. I use polygon. They aren't expensive. It's a million times better and easier.?


On Fri, Feb 4, 2022, 10:53 PM PurpleIce <clone8080@...> wrote:
May I know what restrictions or issues the TWS API has that prevents it from being a data provider? Having a dedicated data source is fine - but adds another dependency for an auto trading system...




IB says in their TWS API documentation that the intended use of the API is not as a data provider.? That continues to show itself to be true.?


 

¿ªÔÆÌåÓý

Thanks for the info. May you please share what headaches you had in using IBKR's data? Just to be curious, as I also need a data source.


From: [email protected] <[email protected]> on behalf of Rob Tilley Jr. <fladventurerob@...>
Sent: Saturday, February 5, 2022 12:09 PM
To: [email protected] <[email protected]>
Subject: Re: [TWS API] reqHistoricalData() for OTC only works if first typed symbol in TWS
?
The limitation is that interactive brokers is a broker, not a data provider. You can pull data, but it's not worth the headache to me, because everything IBKR does is centered around their core business, which is that of a broker. I use polygon. They aren't expensive. It's a million times better and easier.?

On Fri, Feb 4, 2022, 10:53 PM PurpleIce <clone8080@...> wrote:
May I know what restrictions or issues the TWS API has that prevents it from being a data provider? Having a dedicated data source is fine - but adds another dependency for an auto trading system...




IB says in their TWS API documentation that the intended use of the API is not as a data provider.? That continues to show itself to be true.?


 

I just moved over to IBKR a few months ago, and was thinking I could get the same data I had been getting from Polygon, cut that cost, and just use IBKR, I quickly found out I was wrong. Issues with Data limits. Number of concurrent connections. Historical data. Etc. Interactive Brokers, for my needs at least, just isn't set up in a way thats conducive for consuming data. Since Polygon upgraded their systems and APIs I've had zero issues with them. I don't even use IBKRs data for live trading unless it's for futures like DAX which polygon doesn't offer, for everything else, I use polygon streaming websockets data (but they offer REST as well). I can create and destroy API keys if we need to give an outside developer one to work on an issue not in our wheelhouse. I've never run into a connection limit issue. To download 2k tickers, of tick data for a full day, it only takes a few mins. If I want tick data or 2 minute bars or 17 minute bars, the data comes in any form I request it. They have all the other traditional metrics as well. IBKR has been really great for API integration. The one caveat to all this is, you need to be able to develop the programs/scripts you need to consume the polygon data. It's basically the only way to get it. GitHub has some good stuff others made but it made more sense for me to just build things for my usage. Hope that helps.


On Fri, Feb 4, 2022, 11:10 PM Rob Tilley Jr. via <fladventurerob=[email protected]> wrote:
The limitation is that interactive brokers is a broker, not a data provider. You can pull data, but it's not worth the headache to me, because everything IBKR does is centered around their core business, which is that of a broker. I use polygon. They aren't expensive. It's a million times better and easier.?

On Fri, Feb 4, 2022, 10:53 PM PurpleIce <clone8080@...> wrote:
May I know what restrictions or issues the TWS API has that prevents it from being a data provider? Having a dedicated data source is fine - but adds another dependency for an auto trading system...




IB says in their TWS API documentation that the intended use of the API is not as a data provider.? That continues to show itself to be true.?


 

Rob clearly has data needs that require a dedicated data service provider, which IBKR is not. They are a brokerage.

But the IBKR data features are adequate for many (maybe even most) users, especially if your strategy focuses on a set of known instruments. We monitor the IBKR real-time data feeds for about 80 instruments of all types. Among them a few very active futures where we receive high resolution tick-by-tick data as well as level II ask/bid order book details. This results in 40 million to 60 million individual data items per day and peaks of 1,500 trades per second.

But as Rob said, IBKR data (especially historical data request) cannot support strategies that need very broad data sets, say the OHLCV for all US stocks, for example, or details for all members of the S&P 500. That is where you will need a dedicated and specialized data service provider. Take a look at the , , and documentation specifically the discussions about request pacing and limits. Chances are that you find what you need.

´³¨¹°ù²µ±ð²Ô

On Fri, Feb 4, 2022 at 11:11 PM, PurpleIce wrote:
Thanks for the info. May you please share what headaches you had in using IBKR's data? Just to be curious, as I also need a data source.
?


 

¿ªÔÆÌåÓý

Thanks for the detailed info! Since my need of data is just price and volume and seconds-delay is acceptable, so IBKR might be enough. But for tick-level prices and other metrics, yes, I can see a dedicated data source has its place.

Yet when I get to run a trading bot with sizable fund, I might also take two data sources (IBKR + another) to alert when discrepancy happens.

Thank you again!


From: [email protected] <[email protected]> on behalf of ´³¨¹°ù²µ±ð²Ô Reinold via groups.io <TwsApiOnGroupsIo@...>
Sent: Saturday, February 5, 2022 1:53 PM
To: [email protected] <[email protected]>
Subject: Re: [TWS API] reqHistoricalData() for OTC only works if first typed symbol in TWS
?
Rob clearly has data needs that require a dedicated data service provider, which IBKR is not. They are a brokerage.

But the IBKR data features are adequate for many (maybe even most) users, especially if your strategy focuses on a set of known instruments. We monitor the IBKR real-time data feeds for about 80 instruments of all types. Among them a few very active futures where we receive high resolution tick-by-tick data as well as level II ask/bid order book details. This results in 40 million to 60 million individual data items per day and peaks of 1,500 trades per second.

But as Rob said, IBKR data (especially historical data request) cannot support strategies that need very broad data sets, say the OHLCV for all US stocks, for example, or details for all members of the S&P 500. That is where you will need a dedicated and specialized data service provider. Take a look at the , , and documentation specifically the discussions about request pacing and limits. Chances are that you find what you need.

´³¨¹°ù²µ±ð²Ô
On Fri, Feb 4, 2022 at 11:11 PM, PurpleIce wrote:
Thanks for the info. May you please share what headaches you had in using IBKR's data? Just to be curious, as I also need a data source.
?