Datasets
Downloading QuantConnect Data
Introduction
Running the LEAN engine locally with the CLI requires you to have your own local data. The recommended way to source local data is by purchasing and downloading it from QuantConnect Datasets. This way you can use the same data that is available to your algorithm when you run it in the cloud. You can download this data manually using the CLI or on-demand using LEAN. Before the CLI or LEAN download new files, they check if your local machine already stores the files. The available data and pricing information can be found in the Dataset Market.
Using the CLI
Follow these steps to purchase and download data from QuantConnect Datasets using the CLI:
- Log in to the CLI if you haven't done so already.
- Open a terminal in one of your workspace directories.
- Run
lean data download
to start an interactive downloading wizard. - Go through the interactive wizard to configure the data you want to download.
- After configuring the data you want to download, enter N when asked whether you want to download more data.
$ lean data download Selected data: ... Total price: 10 QCC Organization balance: 20,096,264 QCC Do you want to download more data? [y/N]: N
- In the browser window that opens, read the CLI API Access and Data Agreement and click .
- Go back to the terminal and confirm the purchase to start downloading.
$ lean data download You will be charged 10 QCC from your organization's QCC balance After downloading all files your organization will have 20,096,254 QCC left Continue? [y/N]: y [1/1] Downloading equity/usa/daily/spy.zip (10 QCC)
Using Lean
For more information about using LEAN to download datasets, see Deployment.