Datasets
Polygon
Introduction
Polygon was founded by Quinton Pike in 2017 with the goal to "break down the barriers that have traditionally limited access to high-quality financial data for all". Polygon provides institutional-grade Equity, Option, Index, Forex, and Crypto data for business and educational purposes.
The Polygon data provider streams live asset prices from Polygon. Instead of using the data from QuantConnect or your brokerage, you can use data from Polygon if you're deploying a live algorithm and have an API key. To get an API key, see the API Keys page on the Polygon website If you use this data provider and request historical data, the historical data comes from Polygon.
To view the implementation of the Polygon integration, see the Lean.DataSource.Polygon repository.
QuantConnect Cloud currently only supported streaming Polygon data during live trading. To download Polygon for backtesting, research, and optimizations, use the CLI.
Supported Datasets
The Polygon data provider serves asset price data directly from Polygon. Our integration supports securities from the following asset classes:
To supplement the asset price data from Polygon, we provide the following auxiliary datasets from the Dataset Market:
- US Equity Security Master
- Universe selection datasets
- Non-streaming alternative datasets
For more information about the Polygon data source, see the Polygon API documentation.
Universe Selection
When you trade live on QuantConnect Cloud with the Polygon data provider, QuantConnect provides the universe selection data.
Live Trading
You must have an available live trading node for each live trading algorithm you deploy.
Follow these steps to deploy a live trading algorithm that uses the Polygon data provider:
- Open the project that you want to deploy.
- Click the Deploy Live icon.
- On the Deploy Live page, click the Brokerage field and then click your brokerage from the drop-down menu.
- Enter the required brokerage authentication information.
- In the Data Provider section of the deployment wizard, click .
- Click the Data Provider 1 field and then click from the drop-down menu.
- Enter your Polygon API Key.
- Click .
- (Optional) If your brokerage supports exisiting cash and position holdings, add them.
- (Optional) Set up notifications.
- Configure the Automatically restart algorithm setting.
- Click .
For more information about the required information for each brokerage, see the Deploy Live Algorithms section of your brokerage documentation.
By enabling automatic restarts, the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error. This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
Mutiple 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 Polygon as the second provider, Lean only uses the Polygon data provider for securities that aren't available from the QuantConnect data provider. This configuration makes it possible to use QuantConnect data provider for Equity universe selection and use Polygon for Options on the securities in the universe.
Pricing
To view the prices of the Polygon API packages, see the Simple Pricing page on the Polygon website.