API Reference
lean data download
Description
Lets you purchase and download data from QuantConnect Datasets. This command performs the following actions:
- An interactive wizard is shown allowing you to configure exactly which data you want to download.
- You are asked to accept the CLI API Access and Data Agreement in your web browser.
- You are asked to confirm the purchase one last time.
- 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:
Option | Description |
---|---|
--dataset <value> | The name of the dataset to download data from in non-interactive mode. |
--overwrite | Overwrite existing local data. |
-y / --yes | Automatically confirm payment confirmation prompts. |
--verbose | Enable debug logging. |
--help | Display the help text of the lean data download command and exit. |