Data Feeds
Polygon
Introduction
Instead of using the data feed from your brokerage, you can also use Polygon. This tutorial demonstrates how to set up the Polygon data feed with the QuantConnect Paper Trading brokerage.
Deploy Local Algorithms
Follow these steps to start local live trading with the Polygon data feed:
- Open a terminal in the organization workspace that contains the project.
- Run
lean live "<projectName>"
to start a live deployment wizard for the project in . / <projectName> and then enter a brokerage number.$ lean live "My Project" Select a brokerage: 1) Paper Trading 2) Interactive Brokers 3) Tradier 4) OANDA 5) Bitfinex 6) Coinbase Pro 7) Binance 8) Zerodha 9) Samco 10) Terminal Link 11) Atreyu 12) Trading Technologies 13) Kraken 14) TD Ameritrade Enter an option: 1
- Enter the number of the data feed to use and then follow the steps required for the data connection.
$ lean live "My Project" Select a data feed: 1) Interactive Brokers 2) Tradier 3) Oanda 4) Bitfinex 5) Coinbase Pro 6) Binance 7) Zerodha 8) Samco 9) Terminal Link 10) Kraken 11) TD Ameritrade 12) IQFeed 13) Polygon Data Feed 14) Custom data only To enter multiple options, separate them with comma.:
- Enter your Polygon API key.
$ lean live "My Project" Configure credentials for Polygon Data Feed Your Polygon data feed API Key:
To get your API key, see the API Keys page on the Polygon website.
-
View the result in the <projectName> / live / <timestamp> directory.
Results are stored in real-time in JSON format.
You can save results to a different directory by providing the
--output <path>
option in step 2.
If you already have a live environment configured in your Lean configuration file, you can skip the interactive wizard by providing the --environment <value>
option in step 2.
The value of this option must be the name of an environment which has live-mode
set to true
.