freqtrade-实战 4-下载历史数据
一、下载命令
1. Command: freqtrade list-exchanges
Description: Lists all the supported exchanges by Freqtrade.
2. Command: freqtrade list-pairs --exchange binance --quote USDT
Description: Lists trading pairs available on the Binance exchange quoted in USDT.
3. Command: freqtrade list-timeframes --exchange binance
Description: Lists the available timeframes for data collection on the Binance exchange.
# Timeframes available for the exchange `Binance`: 1s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M
4. Command: freqtrade download-data -c user_data/config_binance_spot.json --timerange 20240401-20240501 -t 5m 1h
Description: Downloads historical spot market data from Binance for the specified timeframe (April 1, 2024, to May 1, 2024) in both 5-minute and 1-hour intervals.
5. Command: freqtrade list-data -c user_data/config_binance_spot.json --show-timerange
Description: Lists the available data ranges for the downloaded spot market data from Binance.
6. Command: freqtrade download-data -c user_data/config_binance_spot.json --timerange 20240401- -t 5m 1h
Description: Downloads historical spot market data from Binance starting from April 1, 2024, up to the latest available data, in both 5-minute and 1-hour intervals.
7. Command: freqtrade download-data -c user_data/config_binance_spot.json --prepend --timerange 20240101-20240401 -t 5m 1h
Description: Prepends historical spot market data from Binance for the specified timeframe (January 1, 2024, to April 1, 2024) in both 5-minute and 1-hour intervals.
8. Command: freqtrade download-data -c user_data/config_bybit_spot.json --timerange 20240401-20240501 -t 5m 1h
Description: Downloads historical spot market data from Bybit for the specified timeframe (April 1, 2024, to May 1, 2024) in both 5-minute and 1-hour intervals.
9. Command: freqtrade download-data -c user_data/config_kucoin_spot.json --timerange 20240401-20240501 -t 5m 1h
Description: Downloads historical spot market data from KuCoin for the specified timeframe (April 1, 2024, to May 1, 2024) in both 5-minute and 1-hour intervals.
10. Command: freqtrade list-pairs --exchange binance --quote USDT --trading-mode futures
Description: Lists trading pairs available on Binance futures market quoted in USDT.
11. Command: freqtrade download-data -c user_data/config_binance_futures.json --timerange 20240401-20240501 -t 5m 1h
Description: Downloads historical futures market data from Binance for the specified timeframe (April 1, 2024, to May 1, 2024) in both 5-minute and 1-hour intervals.
二、配置文件
config_binance_futures.json
{
"max_open_trades": 3,
"stake_currency": "USDT",
"stake_amount": "unlimited",
"tradable_balance_ratio": 0.99,
"fiat_display_currency": "USD",
"dry_run": true,
"dry_run_wallet": 1000,
"cancel_open_orders_on_exit": false,
"trading_mode": "futures",
"margin_mode": "isolated",
"unfilledtimeout": {
"entry": 10,
"exit": 10,
"exit_timeout_count": 0,
"unit": "minutes"
},
"entry_pricing": {
"price_side": "same",
"use_order_book": true,
"order_book_top": 1,
"price_last_balance": 0.0,
"check_depth_of_market": {
"enabled": false,
"bids_to_ask_delta": 1
}
},
"exit_pricing":{
"price_side": "same",
"use_order_book": true,
"order_book_top": 1
},
"exchange": {
"name": "binance",
"key": "",
"secret": "",
"ccxt_config": {},
"ccxt_async_config": {},
"pair_whitelist": [
"BTC/USDT:USDT",
"ETH/USDT:USDT",
"SOL/USDT:USDT"
],
"pair_blacklist": [
]
},
"pairlists": [
],
"telegram": {
"enabled": false,
"token": "",
"chat_id": ""
},
"api_server": {
"enabled": false,
"listen_ip_address": "127.0.0.1",
"listen_port": 8080,
"verbosity": "error",
"enable_openapi": false,
"jwt_secret_key": "bafd78c53750bb39079983ca7c6b7c61aa44aa30463979a4d6d15345b841d608",
"ws_token": "BS5QfNYaeZutNyu46Sm4ucmjrCVLAB9JQg",
"CORS_origins": [],
"username": "",
"password": ""
},
"bot_name": "freqtrade",
"initial_state": "running",
"force_entry_enable": false,
"internals": {
"process_throttle_secs": 5
}
}
--
config_binance_spot.json
{
"max_open_trades": 3,
"stake_currency": "USDT",
"stake_amount": "unlimited",
"tradable_balance_ratio": 0.99,
"fiat_display_currency": "USD",
"dry_run": true,
"dry_run_wallet": 1000,
"cancel_open_orders_on_exit": false,
"trading_mode": "spot",
"margin_mode": "",
"unfilledtimeout": {
"entry": 10,
"exit": 10,
"exit_timeout_count": 0,
"unit": "minutes"
},
"entry_pricing": {
"price_side": "same",
"use_order_book": true,
"order_book_top": 1,
"price_last_balance": 0.0,
"check_depth_of_market": {
"enabled": false,
"bids_to_ask_delta": 1
}
},
"exit_pricing":{
"price_side": "same",
"use_order_book": true,
"order_book_top": 1
},
"exchange": {
"name": "binance",
"key": "",
"secret": "",
"ccxt_config": {},
"ccxt_async_config": {},
"pair_whitelist": [
"BTC/USDT",
"ETH/USDT",
"SOL/USDT"
],
"pair_blacklist": [
]
},
"pairlists": [
],
"telegram": {
"enabled": false,
"token": "",
"chat_id": ""
},
"api_server": {
"enabled": false,
"listen_ip_address": "127.0.0.1",
"listen_port": 8080,
"verbosity": "error",
"enable_openapi": false,
"jwt_secret_key": "bafd78c53750bb39079983ca7c6b7c61aa44aa30463979a4d6d15345b841d608",
"ws_token": "BS5QfNYaeZutNyu46Sm4ucmjrCVLAB9JQg",
"CORS_origins": [],
"username": "",
"password": ""
},
"bot_name": "freqtrade",
"initial_state": "running",
"force_entry_enable": false,
"internals": {
"process_throttle_secs": 5
}
}
--
config_bybit_spot.json
{
"max_open_trades": 3,
"stake_currency": "USDT",
"stake_amount": "unlimited",
"tradable_balance_ratio": 0.99,
"fiat_display_currency": "USD",
"dry_run": true,
"dry_run_wallet": 1000,
"cancel_open_orders_on_exit": false,
"trading_mode": "spot",
"margin_mode": "",
"unfilledtimeout": {
"entry": 10,
"exit": 10,
"exit_timeout_count": 0,
"unit": "minutes"
},
"entry_pricing": {
"price_side": "same",
"use_order_book": true,
"order_book_top": 1,
"price_last_balance": 0.0,
"check_depth_of_market": {
"enabled": false,
"bids_to_ask_delta": 1
}
},
"exit_pricing":{
"price_side": "same",
"use_order_book": true,
"order_book_top": 1
},
"exchange": {
"name": "bybit",
"key": "",
"secret": "",
"ccxt_config": {},
"ccxt_async_config": {},
"pair_whitelist": [
"BTC/USDT",
"ETH/USDT",
"SOL/USDT"
],
"pair_blacklist": [
]
},
"pairlists": [
],
"telegram": {
"enabled": false,
"token": "",
"chat_id": ""
},
"api_server": {
"enabled": false,
"listen_ip_address": "127.0.0.1",
"listen_port": 8080,
"verbosity": "error",
"enable_openapi": false,
"jwt_secret_key": "bafd78c53750bb39079983ca7c6b7c61aa44aa30463979a4d6d15345b841d608",
"ws_token": "BS5QfNYaeZutNyu46Sm4ucmjrCVLAB9JQg",
"CORS_origins": [],
"username": "",
"password": ""
},
"bot_name": "freqtrade",
"initial_state": "running",
"force_entry_enable": false,
"internals": {
"process_throttle_secs": 5
}
}
--
config_kucoin_spot.json
{
"max_open_trades": 3,
"stake_currency": "USDT",
"stake_amount": "unlimited",
"tradable_balance_ratio": 0.99,
"fiat_display_currency": "USD",
"dry_run": true,
"dry_run_wallet": 1000,
"cancel_open_orders_on_exit": false,
"trading_mode": "spot",
"margin_mode": "",
"unfilledtimeout": {
"entry": 10,
"exit": 10,
"exit_timeout_count": 0,
"unit": "minutes"
},
"entry_pricing": {
"price_side": "same",
"use_order_book": true,
"order_book_top": 1,
"price_last_balance": 0.0,
"check_depth_of_market": {
"enabled": false,
"bids_to_ask_delta": 1
}
},
"exit_pricing":{
"price_side": "same",
"use_order_book": true,
"order_book_top": 1
},
"exchange": {
"name": "kucoin",
"key": "",
"secret": "",
"ccxt_config": {},
"ccxt_async_config": {},
"pair_whitelist": [
"BTC/USDT",
"ETH/USDT",
"SOL/USDT"
],
"pair_blacklist": [
]
},
"pairlists": [
],
"telegram": {
"enabled": false,
"token": "",
"chat_id": ""
},
"api_server": {
"enabled": false,
"listen_ip_address": "127.0.0.1",
"listen_port": 8080,
"verbosity": "error",
"enable_openapi": false,
"jwt_secret_key": "bafd78c53750bb39079983ca7c6b7c61aa44aa30463979a4d6d15345b841d608",
"ws_token": "BS5QfNYaeZutNyu46Sm4ucmjrCVLAB9JQg",
"CORS_origins": [],
"username": "",
"password": ""
},
"bot_name": "freqtrade",
"initial_state": "running",
"force_entry_enable": false,
"internals": {
"process_throttle_secs": 5
}
}
相关文章:
02 How to Download Historical Data For Freqtrade like a PRO!
为者常成,行者常至
自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)