API Reference

lean data download

Introduction

Purchase and download data from QuantConnect Datasets.

$ lean data download [options]

Description

Lets you purchase and download data from QuantConnect Datasets. This command performs the following actions:

  1. An interactive wizard is shown allowing you to configure exactly which data you want to download.
  2. You are asked to accept the CLI API Access and Data Agreement in your web browser.
  3. You are asked to confirm the purchase one last time.
  4. The CLI downloads the requested files while charging the organization that's linked to your current organization workspace.

The available datasets and their pricing can be found in QuantConnect Datasets. Data is priced on a per-file per-download basis, meaning you pay a certain number of QuantConnect Credits (QCC) for each file you download. The required QCC is deducted from your organization's QCC balance when a file is downloaded. If you force-quit the command before it downloaded all requested files, you are not charged for the files you didn't download.

When --dataset is given, the command runs in non-interactive mode and several steps in the preceding list are skipped. Instead, the command reads the downloading configuration from the given command-line options. In this mode, the --dataset option is required, as well as all options specific to the selected dataset.

Example non-interactive usage:

$ lean data download \
    --dataset "Bitfinex Crypto Price Data" \
    --data-type "Trade" \
    --ticker "BTCUSDT" \
    --resolution "Daily" \
    --start "20201208" \
    --end "20221208" 

In case the local data already exists, a warning is logged and you are given the choice of whether you want to enable overwriting existing data or not. Use the --overwrite flag to override this behavior and enable overwriting existing data in all such cases.

To automatically confirm payment confirmation prompts, use the --yes flag.

Options

The lean data download command supports the following options:

OptionDescription
--dataset <value>The name of the dataset to download data from in non-interactive mode.
--overwriteOverwrite existing local data.
-y / --yesAutomatically confirm payment confirmation prompts.
--lean-config
--verboseEnable debug logging.
--helpDisplay the help text of the lean data download command and exit.

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: