πChapter 1: "Freqtrade Common Commands Guide β Master Crypto Trading Bot Operations in One Article"
This article was produced by the Quantitative Trading Lab at https://www.itrade.icu. Visit for more benefits. βMaster the key commands for cryptocurrency trading bots from beginner to live trading in one article!β
Freqtrade is a powerful open-source cryptocurrency automated trading framework that supports strategy development, historical backtesting, parameter optimization, data analysis, and live trading. For beginners, the functions and uses of various commands may not be intuitive. This article categorizes and explains all core Freqtrade commands, providing common use cases and CLI examples.
π― Command Structure Overview
Freqtradeβs CLI tool uses freqtrade as the main command, with different subcommands for different tasks:
freqtrade <subcommand> [options]You can view the main command help via freqtrade -h, or see detailed parameters of a subcommand with freqtrade <subcommand> -h.
π¦ Quick Command Classification
Data Handling
download-data, convert-data
Download / process historical market data
Strategy Dev & Testing
new-strategy, backtesting, hyperopt
Create and test trading strategies
Live Trading
trade, webserver
Start the bot for trading or dry-run
System Configuration
new-config, create-userdir
Initialize config and project structure
Query & Diagnostics
show-trades, list-data, list-pairs
Query strategies, data, and trade history
Visualization
plot-dataframe
Chart-based visualization of strategy behavior
π 1. Live and Dry-Run Trading Commands
trade β Start the trading bot (live or dry-run)
trade β Start the trading bot (live or dry-run)--dry-run: Simulated trading without real orders (recommended for beginners)--db-url: Specify database (stores trade history)--logfile: Path to save logs
β οΈ Ensure the strategy has been backtested and
config.jsonis properly set before starting!
π₯ 2. Data Downloading and Processing Commands
download-data β Download historical market data
download-data β Download historical market data--exchange: Supports multiple exchanges like binance, bybit, etc.--pairs: Can specify multiple trading pairs at once--timeframes: Supports 1m, 5m, 15m, 1h, 1d intervals
convert-data β Convert data format (CSV β JSON)
convert-data β Convert data format (CSV β JSON)Use this when importing external data sources (e.g., CCXT, Kaggle) to Freqtrade format.
π§ͺ 3. Strategy Development and Backtesting Commands
new-strategy β Create a strategy template
new-strategy β Create a strategy templateGenerates a .py file with annotated structure in user_data/strategies/.
backtesting β Backtest strategy performance
backtesting β Backtest strategy performanceSimulate historical trades to evaluate strategy PnL
Can set timeframe, trading pairs, etc.
Recommended to use with
backtesting-showfor chart visualization
hyperopt β Parameter optimization
hyperopt β Parameter optimizationAutomatically search for optimal parameter combinations (e.g., RSI thresholds, take-profit ratios)
Supports multiple evaluation metrics (Sharpe, Sortino, pure profit, etc.)
π 4. Data Visualization Command
plot-dataframe β Visualize strategy behavior in charts
plot-dataframe β Visualize strategy behavior in chartsGenerates HTML charts showing buy/sell points, candlesticks, and indicators
Charts are saved in
user_data/plot/
βοΈ 5. Configuration and Project Initialization Commands
new-config β Create a configuration file
new-config β Create a configuration fileIncludes basic settings such as trading pairs, strategy name, risk management, and capital allocation.
create-userdir β Initialize project structure
create-userdir β Initialize project structureCreates common directories (logs, data, strategies, configs).
π 6. Query and Utility Commands
show-trades
Display trade / backtesting history
list-data
View available local historical data
list-pairs
Show trading pairs supported in current config
list-exchanges
List exchanges supported by Freqtrade
list-strategies
Display strategy classes in strategies/ folder
list-timeframes
Show supported timeframe formats
β
Commands to Master for Daily Use
π³ Running Commands in Docker
Most commands also work under Docker:
Ensure the mount paths in docker-compose.yml are correct.
π Summary
Freqtradeβs CLI covers the entire quantitative workflow: from data β backtesting β optimization β live trading, making it ideal for developers and strategy researchers.
Recommended workflow:
Download data (
download-data)Write strategy (
new-strategy)Backtest & tune (
backtesting + hyperopt)Run live (
trade + Web UI)Visualize results (
plot-dataframe)
Master these commands, and you can independently manage a full cryptocurrency automated trading system!
Last updated