Historical Data

Live Trading

Introduction

When you make history requests in live trading, be aware of the associated data delays and the data provider's functionality.

Data Delays

Backtests have access to data up to \(t-1\) to \(t-4\) days, where \(t\) is the current day. The availability depends on the data type.

In live trading, history requests take 5-10 seconds to return the data. While LEAN processes the request, the algorithm doesn't receive any new data points.

Multiple Data Providers

When you deploy a live algorithm, you can add multiple data provider. If you use multiple data providers, the order you select them in defines their order of precedence in Lean. For example, if you set QuantConnect as the first provider and Interactive Brokers (IB) as the second provider, Lean only uses the IB data provider for securities that aren't available from the QuantConnect data provider. This configuration makes it possible to use the QuantConnect data provider for Equity universe selection and then place Options trades on the securities in the universe.

Data Provider Limitations

History requests from third-party data providers are much slower than from the QuantConnect data provider. If you need data from a third-party data provider, request small amounts or your algorithm may take longer than 10 minutes to process and cause a timeout. For more information about the data providers, see their respective documentation in Cloud Platform, Local Platform, or the CLI.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: