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 checks 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 your CLI root directory.
  3. Run lean data download to start an interactive downloading wizard.
    $ lean data download
    Select the organization to purchase and download data with:
    1) Organization 1
    2) Organization 2
    3) Organization 3
    Enter an option:
  4. Enter the number of the organization you want to be charged for the data you want to buy. If you are only a member of a single organization this step is skipped automatically.
    $ lean data download
    Select the organization to purchase and download data with:
    1) Organization 1
    2) Organization 2
    3) Organization 3
    Enter an option: 1
  5. Go through the interactive wizard to configure the data you want to download.
  6. 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
  7. In the browser window that opens, read the CLI API Access and Data Agreement and click I Accept The Data Agreement.
  8. 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.

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: