πFreqtrade config.json Basics & Initialization
This article was produced by the Quantitative Trading Lab at https://www.itrade.icu. Visit for more benefits. Before using Freqtrade for strategy backtesting, data downloading, or live trading, the most crucial step is to create and configure the
config.jsonfile. It serves as the βmain command centerβ of the entire trading framework, determining which exchange to connect, how to trade, how strategies run, and how funds are allocated.
This guide explains the purpose, creation, structure, and editing tips for config.json, helping you get started quickly and avoid common pitfalls.
π§± What is config.json?
config.json is the main configuration file for Freqtrade, centralizing all runtime parameters:
Exchange account info (API Key / Secret / Password)
Trading coins and amount settings
Strategy rules (e.g., maximum open trades, long/short settings)
Data timeframes and backtesting settings
Limit / market order control
Risk management settings (stop-loss, take-profit, slippage)
Optional notification channels (Webhook, Telegram, etc.)
No matter if you are doing data analysis, backtesting, or live deployment, this file is indispensable.
π How to generate config.json
Freqtrade provides a CLI tool to quickly generate a default template, ideal for beginners:
Notes:
--configspecifies the target path (official recommendation:user_data/config.json)If the directory does not exist, it will be automatically created
After generation, you can edit it with any text editor
π Recommended project structure
Recommended folder layout:
Keeping
config.jsoninsideuser_data/ensures consistent paths and easier backups.
π³ Docker folder structure
When using Docker, the directory is controlled via volume mapping:
You can modify
user_data/config.jsonto adjust runtime parameters without rebuilding the Docker image.
π Beginner example
Basic config.json snippet:
Field explanations:
max_open_trades: Maximum simultaneous open positionsstake_currency: Base trading currency (e.g., USDT)stake_amount: Amount used per tradedry_run: Enable simulated trading (true = no real funds used)
π οΈ Editing & debugging tips
Check if the exchange API is valid:
β Yes
β Yes
β Yes
Full functionality, live trading possible
β No
β Depends on exchange
β No
Can only view market data
Initialize strategy check:
This helps catch strategy or config errors before live trading.
π§ Summary
File name
Keep as config.json, recommended in user_data/
Generate command
freqtrade new-config --config path
Debugging
Use backtesting or list-markets to check
Version control
β
Strongly recommend including config.json in Git
This guide helps you initialize config.json, the foundation for running strategies, downloading data, and deploying to live trading.
Last updated