How do I obtain historical data via API?

Historical market data is available via a number of methods through our API offerings. The TWS API allows one to request historical bar data, historical tick data and histogram data, while the Web API allows one to request historical bar data.

For detailed documentation of this functionality and the associated limitations, please see:

Please Note

  • The appropriate market data subscription is typically required to obtain historical market data.
Powered by IBot
Do you offer tick-by-tick data via the API?
How can I download historical data from outside regular trading hours using the TWS API ?
How can I download option chain historical data with API?
Are stock loan borrow rates available via the API?