Datasets

IEX Cloud

Introduction

Instead of using the data from QuantConnect or your brokerage, you can use IEX Cloud if you're deploying a local project. To use IEX Cloud, you need an account subscribed to one or more data bundles. You also must select either the Launch, Grow, or Enterprise subscription tier; this dictates your maximum requests per second. If you don't have an account, register today and get your API key. Pricing information can be found here.

Upon registration, your account will automatically start a 7-day free trial. This trial has access to all API endpoints and a rate limit of 5 requests per second. If you have any questions regarding IEX Cloud's API service, please contact them here: support@iexcloud.io.

To view the implementation of the IEX Cloud integration, see the Lean.DataSource.IEX repository.

Supported Datasets

Our IEX Cloud integration supports US Equity securities.

Universe Selection

Universe Selection is available with the IEX Cloud data provider if you download the data from the Dataset Market. The dataset listings show how to download the universe selection data with the CLI. For live trading, you'll need to periodically download the new data from QuantConnect Cloud, which you can automate with Python scripts. For example, the following tutorials explain how to download historical data and download daily updates:

Alternative Data

If you have licensed alternative data with QuantConnect, it works as expected with the IEX Cloud data provider for research, backtesting, and live trading.

Download

To download IEX data, open a terminal in your organization workspace and then run lean data download --data-provider-historical IEX --data-type Trade --resolution <resolution> --security-type EQUITY --ticker <tickers> --start <YYYYMMDD> --end <YYYYMMDD> --iex-cloud-api-key <apiKey> --iex-price-plan <pricePlan>.

$ lean data download --data-provider-historical IEX --data-type Trade --resolution Daily --security-type Equity --ticker GOOGL --start 20100101 --end 20240404 --iex-cloud-api-key apiKey --iex-price-plan Grow

The --iex-price-plan option must be Launch, Grow, or Enterprise. If you provide your credentials, your Lean configuration file saves them.

Research

To access IEX Cloud data from the local Research Environment, open a terminal in your organization workspace and then run lean research <projectName> --data-provider-historical IEX --iex-cloud-api-key <apiKey> --iex-price-plan <pricePlan>.

$ lean research "My Project" --data-provider-historical IEX --iex-cloud-api-key apiKey --iex-price-plan Grow

The --iex-price-plan option must be Launch, Grow, or Enterprise. If you provide any of the preceding options, your Lean configuration file saves them so that you only need to run lean research <projectName> to open the Research Environment with the same options.

Backtesting

To run a local backtest with IEX Cloud data, open a terminal in your organization workspace and then run lean backtest <projectName> --data-provider-historical IEX --iex-cloud-api-key <apiKey> --iex-price-plan <pricePlan>.

$ lean backtest "My Project" --data-provider-historical IEX --iex-cloud-api-key apiKey --iex-price-plan Grow

The --iex-price-plan option must be Launch, Grow, or Enterprise. If you provide any of the preceding options, your Lean configuration file saves them so that you only need to run lean backtest <projectName> to run another backtest with the same options.

Optimization

Follow these steps to run a local optimization job with IEX Cloud data:

  1. Add some parameters to your project.
  2. Open a terminal in your organization workspace.
  3. Run lean optimize <projectName> --data-provider-historical IEX --iex-cloud-api-key <apiKey> --iex-price-plan <pricePlan>.
  4. $ lean optimize "My Project" --data-provider-historical IEX --iex-cloud-api-key apiKey --iex-price-plan Grow

    The --iex-price-plan option must be Launch, Grow, or Enterprise.

  5. Follow the steps in the interactive wizard to configure your optimization job settings.

The lean optimize command also accepts additional options so that you can select IEX Cloud and run the command in non-interactive mode. If you provide any of the preceding options, your Lean configuration file saves them so that you only need to run lean optimize <projectName> to run another optimization job with the same options.

Live Trading

To deploy a local live algorithm that uses IEX Cloud as the data provider, open a terminal in your organization workspace and then run lean live deploy <projectName> --data-provider-live IEX --iex-cloud-api-key <apiKey> --iex-price-plan <pricePlan> --brokerage <brokerageName> <requiredBrokerageOptions>.

$ lean live deploy "My Project" --data-provider-live IEX --iex-cloud-api-key apiKey --iex-price-plan Grow --brokerage "Paper Trading"

The --iex-price-plan option must be Launch, Grow, or Enterprise. Depending on the brokerage you select, you may need to provide some required brokerage options. To use a different provider for historical data, include the --data-provider-historical option. If you provide any of the preceding options, your Lean configuration file saves them so that you only need to run lean live deploy <projectName> --brokerage <brokerageName> to deploy another live algorithm with the same options.

To deploy the algorithm in QuantConnect Cloud while still using IEX Cloud as the data provider, run lean cloud live deploy <projectName> --data-provider-live IEX --iex-cloud-api-key <apiKey> --iex-price-plan <pricePlan> --brokerage <brokerageName> <requiredBrokerageOptions> --node <nodeName> --auto-restart <enableAutoRestarts> --notify-order-events <enableOrderEventNotifications> --notify-insights <enableInsightNotifications> <requiredNotificationOptions>.

$ lean cloud live deploy "My Project" --data-provider-live IEX --iex-cloud-api-key apiKey --iex-price-plan Grow --brokerage "Paper Trading" --node "My Node" --auto-restart yes --notify-order-events no --notify-insights no

To deploy the live algorithm through the interactive mode of the CLI, see IEX Cloud.

Pricing

To view the prices of the IEX Cloud API packages, contact their support team.

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: