πŸ“˜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.json file. 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:

  • --config specifies 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 folder layout:

Keeping config.json inside user_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.json to adjust runtime parameters without rebuilding the Docker image.


πŸ” Beginner example

Basic config.json snippet:

Field explanations:

  • max_open_trades: Maximum simultaneous open positions

  • stake_currency: Base trading currency (e.g., USDT)

  • stake_amount: Amount used per trade

  • dry_run: Enable simulated trading (true = no real funds used)


πŸ› οΈ Editing & debugging tips

  1. Check if the exchange API is valid:

API Key Configured
list-markets works?
Can trade?
Notes

βœ… Yes

βœ… Yes

βœ… Yes

Full functionality, live trading possible

❌ No

βœ… Depends on exchange

❌ No

Can only view market data

  1. Initialize strategy check:

This helps catch strategy or config errors before live trading.


🧠 Summary

Key point
Recommendation

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