Open 8W9aG opened 9 months ago
I think this falls back on the regular disclaimer IBKR is not a reliable data provider.
For bulk data you'll want something more data oriented like polygon.io.
You are likely being cut off by IBKR's "pacing violations" logic: https://interactivebrokers.github.io/tws-api/historical_limitations.html
I have a script that attempts to find the historical data for futures (lets say
ZF
), and in doing so loops through the contract months from 3 years ago to 3 years in the future, for example 202103, 202106, 202109.An example of this call is like so:
Some of these result in a timeout (no matter what the value of the timeout is). Its reasonable that I receive no bars for my request having said that I suspect that if the contract month is not valid or too far in the past something gets lost and it just times out instead of giving me an empty bars result. Given I make a lot of these requests I would much prefer empty results rather than waiting for a timeout, its also hard for me to determine whether the timeout is valid in this case or whether the API doesn't want to give me the data.