This article was produced by the Quantitative Trading Lab at https://www.itrade.icuarrow-up-right . Visit for more benefits.
In Freqtrade, K-line data is the foundation for backtesting, optimization, and live trading . Whether you are a strategy developer or researcher, mastering the download-data command is the first step in quantitative trading.
This article explains how to use freqtrade download-data to download historical market data, including common parameters, Docker usage, download recommendations, and supported exchanges.
Download by specifying trading pairs:
Copy freqtrade download-data \
--exchange binance \
--pairs BTC/USDT \
--timeframes 1h \
--timerange 20230101-20230701 Download according to config.json:
Copy freqtrade download-data \
--config user_data/config.json \
--timeframes 15m \
--timerange 20200101-20250626 Common Parameter Explanation
Choose exchange (e.g., binance, bybit, kucoin)
Specify trading pairs, e.g., BTC/USDT, multiple separated by commas
Timeframe to download, e.g., 1m, 15m, 1h, 1d
Data period, format YYYYMMDD-YYYYMMDD
Download the last N days of data (mutually exclusive with timerange)
(Optional) Use an existing config file to specify exchange
π 2. Suggestions for Downloading Multiple Coins / Timeframes
Multiple pairs (e.g., BTC, ETH, BNB):
Multiple timeframes (e.g., download 15m and 1h simultaneously):
Best practice: download each timeframe separately for easier management:
π³ 3. Downloading Data in Docker
For Docker deployments, the command differs slightly:
Ensure you mount the user_data/ directory correctly in docker-compose.yml:
π 4. Where Is the Data Stored?
Downloaded K-line data is saved at:
Example:
Freqtrade automatically recognizes and uses these files for backtesting and optimization.
π 5. Supported Exchanges in Freqtrade
You can run the following command to see supported exchanges:
Common supported exchanges (may vary by version):
β οΈ Some exchanges require an API key to download historical data.
β
6. Notes and Recommendations
Usually cover at least 3β6 months of data
For strategy development, 1h or 15m is common; for high-frequency strategies, use 1m
Too long data may mislead due to structural market changes
1m data consumes significant disk space
freqtrade download-data is the starting point for all strategy development. This article covered:
Parameter usage: exchange / pairs / timeframes / timerange
Techniques for downloading multiple coins and multiple timeframes
Docker environment download method
Data storage path and supported exchanges