Downloading QuantConnect Data


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:

  1. Log in to the CLI if you haven't done so already.
  2. Open a terminal in one of your workspace directories.
  3. Run lean data download to start an interactive downloading wizard.
  4. Go through the interactive wizard to configure the data you want to download.
  5. 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
  6. In the browser window that opens, read the CLI API Access and Data Agreement and click I Accept The Data Agreement.
  7. 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/ (10 QCC)

Using Lean

For more information about using LEAN to download datasets, see Deployment.

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: