From 047dac7b7dd37b6241d8f198059ac0952e509f74 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 21 Nov 2023 06:37:58 +0100 Subject: [PATCH 01/10] Remove bittrex from supported exchanges --- README.md | 1 - docs/configuration.md | 4 ++-- docs/index.md | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0cacfe703..4ed144f93 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,6 @@ hesitate to read the source code and understand the mechanism of this bot. Please read the [exchange specific notes](docs/exchanges.md) to learn about eventual, special configurations needed for each exchange. - [X] [Binance](https://www.binance.com/) -- [X] [Bittrex](https://bittrex.com/) - [X] [Gate.io](https://www.gate.io/ref/6266643) - [X] [Huobi](http://huobi.com/) - [X] [Kraken](https://kraken.com/) diff --git a/docs/configuration.md b/docs/configuration.md index 7303f78c7..313e3e456 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -594,7 +594,7 @@ creating trades on the exchange. ```json "exchange": { - "name": "bittrex", + "name": "binance", "key": "key", "secret": "secret", ... @@ -644,7 +644,7 @@ API Keys are usually only required for live trading (trading for real money, bot ```json { "exchange": { - "name": "bittrex", + "name": "binance", "key": "af8ddd35195e9dc500b9a6f799f6f5c93d89193b", "secret": "08a9dc6db3d7b53e1acebd9275677f4b0a04f1a5", //"password": "", // Optional, not needed by all exchanges) diff --git a/docs/index.md b/docs/index.md index 190e7e3c3..dd80db958 100644 --- a/docs/index.md +++ b/docs/index.md @@ -40,7 +40,6 @@ Freqtrade is a free and open source crypto trading bot written in Python. It is Please read the [exchange specific notes](exchanges.md) to learn about eventual, special configurations needed for each exchange. - [X] [Binance](https://www.binance.com/) -- [X] [Bittrex](https://bittrex.com/) - [X] [Gate.io](https://www.gate.io/ref/6266643) - [X] [Huobi](http://huobi.com/) - [X] [Kraken](https://kraken.com/) From 3619247123024bb05fd4e6957d384b8f9eafdc01 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 21 Nov 2023 06:38:30 +0100 Subject: [PATCH 02/10] Remove bittrex from code for suppored exchanges --- freqtrade/commands/build_config_commands.py | 1 - freqtrade/exchange/common.py | 1 - 2 files changed, 2 deletions(-) diff --git a/freqtrade/commands/build_config_commands.py b/freqtrade/commands/build_config_commands.py index 6692ad59a..2dff87a7d 100644 --- a/freqtrade/commands/build_config_commands.py +++ b/freqtrade/commands/build_config_commands.py @@ -108,7 +108,6 @@ def ask_user_config() -> Dict[str, Any]: "choices": [ "binance", "binanceus", - "bittrex", "gate", "huobi", "kraken", diff --git a/freqtrade/exchange/common.py b/freqtrade/exchange/common.py index 10dfdf178..36bed9b20 100644 --- a/freqtrade/exchange/common.py +++ b/freqtrade/exchange/common.py @@ -52,7 +52,6 @@ MAP_EXCHANGE_CHILDCLASS = { SUPPORTED_EXCHANGES = [ 'binance', - 'bittrex', 'gate', 'huobi', 'kraken', From e7aa706f73756a0dc65b3c76650a10be12f0d580 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 21 Nov 2023 06:39:38 +0100 Subject: [PATCH 03/10] Update samples with binance --- docs/backtesting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/backtesting.md b/docs/backtesting.md index 41498fb00..d13b00a38 100644 --- a/docs/backtesting.md +++ b/docs/backtesting.md @@ -170,11 +170,11 @@ freqtrade backtesting --strategy AwesomeStrategy --dry-run-wallet 1000 Using a different on-disk historical candle (OHLCV) data source -Assume you downloaded the history data from the Bittrex exchange and kept it in the `user_data/data/bittrex-20180101` directory. +Assume you downloaded the history data from the Binance exchange and kept it in the `user_data/data/binance-20180101` directory. You can then use this data for backtesting as follows: ```bash -freqtrade backtesting --strategy AwesomeStrategy --datadir user_data/data/bittrex-20180101 +freqtrade backtesting --strategy AwesomeStrategy --datadir user_data/data/binance-20180101 ``` --- From 65df2f30c164564321f5835be4d2853712aa77c4 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 21 Nov 2023 06:42:53 +0100 Subject: [PATCH 04/10] Update some more docs with bittrex removal --- docs/utils.md | 54 ++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/docs/utils.md b/docs/utils.md index 65ab50b9e..ac0d341bd 100644 --- a/docs/utils.md +++ b/docs/utils.md @@ -427,25 +427,33 @@ zb True missing opt: fetchMyTrades Use the `list-timeframes` subcommand to see the list of timeframes available for the exchange. ``` -usage: freqtrade list-timeframes [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH] [--userdir PATH] [--exchange EXCHANGE] [-1] +usage: freqtrade list-timeframes [-h] [-v] [--logfile FILE] [-V] [-c PATH] + [-d PATH] [--userdir PATH] + [--exchange EXCHANGE] [-1] -optional arguments: +options: -h, --help show this help message and exit - --exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no config is provided. + --exchange EXCHANGE Exchange name. Only valid if no config is provided. -1, --one-column Print output in one column. Common arguments: -v, --verbose Verbose mode (-vv for more, -vvv to get all messages). - --logfile FILE Log to the file specified. Special values are: 'syslog', 'journald'. See the documentation for more details. + --logfile FILE, --log-file FILE + Log to the file specified. Special values are: + 'syslog', 'journald'. See the documentation for more + details. -V, --version show program's version number and exit -c PATH, --config PATH - Specify configuration file (default: `config.json`). Multiple --config options may be used. Can be set to `-` - to read config from stdin. - -d PATH, --datadir PATH + Specify configuration file (default: + `userdir/config.json` or `config.json` whichever + exists). Multiple --config options may be used. Can be + set to `-` to read config from stdin. + -d PATH, --datadir PATH, --data-dir PATH Path to directory with historical backtesting data. --userdir PATH, --user-data-dir PATH Path to userdata directory. + ``` * Example: see the timeframes for the 'binance' exchange, set in the configuration file: @@ -479,20 +487,17 @@ usage: freqtrade list-markets [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH] [--userdir PATH] [--exchange EXCHANGE] [--print-list] [--print-json] [-1] [--print-csv] [--base BASE_CURRENCY [BASE_CURRENCY ...]] - [--quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]] [-a] - [--trading-mode {spot,margin,futures}] - + [--quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]] + [-a] [--trading-mode {spot,margin,futures}] usage: freqtrade list-pairs [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH] [--userdir PATH] [--exchange EXCHANGE] [--print-list] [--print-json] [-1] [--print-csv] [--base BASE_CURRENCY [BASE_CURRENCY ...]] [--quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]] [-a] [--trading-mode {spot,margin,futures}] - -optional arguments: +options: -h, --help show this help message and exit - --exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no - config is provided. + --exchange EXCHANGE Exchange name. Only valid if no config is provided. --print-list Print list of pairs or market symbols. By default data is printed in the tabular format. --print-json Print list of pairs or market symbols in JSON format. @@ -504,20 +509,22 @@ optional arguments: Specify quote currency(-ies). Space-separated list. -a, --all Print all pairs or market symbols. By default only active ones are shown. - --trading-mode {spot,margin,futures} + --trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures} Select Trading mode Common arguments: -v, --verbose Verbose mode (-vv for more, -vvv to get all messages). - --logfile FILE Log to the file specified. Special values are: + --logfile FILE, --log-file FILE + Log to the file specified. Special values are: 'syslog', 'journald'. See the documentation for more details. -V, --version show program's version number and exit -c PATH, --config PATH - Specify configuration file (default: `config.json`). - Multiple --config options may be used. Can be set to - `-` to read config from stdin. - -d PATH, --datadir PATH + Specify configuration file (default: + `userdir/config.json` or `config.json` whichever + exists). Multiple --config options may be used. Can be + set to `-` to read config from stdin. + -d PATH, --datadir PATH, --data-dir PATH Path to directory with historical backtesting data. --userdir PATH, --user-data-dir PATH Path to userdata directory. @@ -532,7 +539,7 @@ Pairs/markets are sorted by its symbol string in the printed output. ### Examples * Print the list of active pairs with quote currency USD on exchange, specified in the default -configuration file (i.e. pairs on the "Bittrex" exchange) in JSON format: +configuration file (i.e. pairs on the "Binance" exchange) in JSON format: ``` $ freqtrade list-pairs --quote USD --print-json @@ -564,7 +571,7 @@ usage: freqtrade test-pairlist [-h] [--userdir PATH] [-v] [-c PATH] [--quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]] [-1] [--print-json] [--exchange EXCHANGE] -optional arguments: +options: -h, --help show this help message and exit --userdir PATH, --user-data-dir PATH Path to userdata directory. @@ -578,8 +585,7 @@ optional arguments: Specify quote currency(-ies). Space-separated list. -1, --one-column Print output in one column. --print-json Print list of pairs or market symbols in JSON format. - --exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no - config is provided. + --exchange EXCHANGE Exchange name. Only valid if no config is provided. ``` From 9990780e6ba951c5b8b459e9848a3837247b455f Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 21 Nov 2023 06:44:44 +0100 Subject: [PATCH 05/10] Update binance config to be for usdt pairs --- config_examples/config_binance.example.json | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/config_examples/config_binance.example.json b/config_examples/config_binance.example.json index 7968bdedc..3a2cea530 100644 --- a/config_examples/config_binance.example.json +++ b/config_examples/config_binance.example.json @@ -1,6 +1,6 @@ { "max_open_trades": 3, - "stake_currency": "BTC", + "stake_currency": "USDT", "stake_amount": 0.05, "tradable_balance_ratio": 0.99, "fiat_display_currency": "USD", @@ -36,21 +36,21 @@ "ccxt_async_config": { }, "pair_whitelist": [ - "ALGO/BTC", - "ATOM/BTC", - "BAT/BTC", - "BCH/BTC", - "BRD/BTC", - "EOS/BTC", - "ETH/BTC", - "IOTA/BTC", - "LINK/BTC", - "LTC/BTC", - "NEO/BTC", - "NXS/BTC", - "XMR/BTC", - "XRP/BTC", - "XTZ/BTC" + "ALGO/USDT", + "ATOM/USDT", + "BAT/USDT", + "BCH/USDT", + "BRD/USDT", + "EOS/USDT", + "ETH/USDT", + "IOTA/USDT", + "LINK/USDT", + "LTC/USDT", + "NEO/USDT", + "NXS/USDT", + "XMR/USDT", + "XRP/USDT", + "XTZ/USDT" ], "pair_blacklist": [ "BNB/.*" From b45365d385beb1667c728fd2feefd46c35e32418 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 21 Nov 2023 06:47:50 +0100 Subject: [PATCH 06/10] Update tests to run for binance --- .github/workflows/ci.yml | 12 ++-- build_helpers/publish_docker_arm64.sh | 2 +- build_helpers/publish_docker_multi.sh | 2 +- tests/testdata/config_tests.example.json | 77 ++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 8 deletions(-) create mode 100644 tests/testdata/config_tests.example.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 912b906d7..94f2a4461 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,7 +90,7 @@ jobs: - name: Backtesting (multi) run: | - cp config_examples/config_bittrex.example.json config.json + cp tests/testdata/config_tests.example.json config.json freqtrade create-userdir --userdir user_data freqtrade new-strategy -s AwesomeStrategy freqtrade new-strategy -s AwesomeStrategyMin --template minimal @@ -98,7 +98,7 @@ jobs: - name: Hyperopt run: | - cp config_examples/config_bittrex.example.json config.json + cp tests/testdata/config_tests.example.json config.json freqtrade create-userdir --userdir user_data freqtrade hyperopt --datadir tests/testdata -e 6 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all @@ -200,14 +200,14 @@ jobs: - name: Backtesting run: | - cp config_examples/config_bittrex.example.json config.json + cp tests/testdata/config_tests.example.json config.json freqtrade create-userdir --userdir user_data freqtrade new-strategy -s AwesomeStrategyAdv --template advanced freqtrade backtesting --datadir tests/testdata --strategy AwesomeStrategyAdv - name: Hyperopt run: | - cp config_examples/config_bittrex.example.json config.json + cp tests/testdata/config_tests.example.json config.json freqtrade create-userdir --userdir user_data freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all @@ -275,13 +275,13 @@ jobs: - name: Backtesting run: | - cp config_examples/config_bittrex.example.json config.json + cp tests/testdata/config_tests.example.json config.json freqtrade create-userdir --userdir user_data freqtrade backtesting --datadir tests/testdata --strategy SampleStrategy - name: Hyperopt run: | - cp config_examples/config_bittrex.example.json config.json + cp tests/testdata/config_tests.example.json config.json freqtrade create-userdir --userdir user_data freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all diff --git a/build_helpers/publish_docker_arm64.sh b/build_helpers/publish_docker_arm64.sh index 8f0de2cc9..c00de6c32 100755 --- a/build_helpers/publish_docker_arm64.sh +++ b/build_helpers/publish_docker_arm64.sh @@ -54,7 +54,7 @@ docker tag freqtrade:$TAG_FREQAI_ARM ${CACHE_IMAGE}:$TAG_FREQAI_ARM docker tag freqtrade:$TAG_FREQAI_RL_ARM ${CACHE_IMAGE}:$TAG_FREQAI_RL_ARM # Run backtest -docker run --rm -v $(pwd)/config_examples/config_bittrex.example.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests freqtrade:${TAG_ARM} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3 +docker run --rm -v $(pwd)/tests/testdata/config_tests.example.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests freqtrade:${TAG_ARM} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3 if [ $? -ne 0 ]; then echo "failed running backtest" diff --git a/build_helpers/publish_docker_multi.sh b/build_helpers/publish_docker_multi.sh index 72b20ac5d..a4bf32c5a 100755 --- a/build_helpers/publish_docker_multi.sh +++ b/build_helpers/publish_docker_multi.sh @@ -67,7 +67,7 @@ docker tag freqtrade:$TAG_FREQAI ${CACHE_IMAGE}:$TAG_FREQAI docker tag freqtrade:$TAG_FREQAI_RL ${CACHE_IMAGE}:$TAG_FREQAI_RL # Run backtest -docker run --rm -v $(pwd)/config_examples/config_bittrex.example.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests freqtrade:${TAG} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3 +docker run --rm -v $(pwd)/tests/testdata/config_tests.example.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests freqtrade:${TAG} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3 if [ $? -ne 0 ]; then echo "failed running backtest" diff --git a/tests/testdata/config_tests.example.json b/tests/testdata/config_tests.example.json new file mode 100644 index 000000000..c9ed89504 --- /dev/null +++ b/tests/testdata/config_tests.example.json @@ -0,0 +1,77 @@ +{ + "max_open_trades": 3, + "stake_currency": "BTC", + "stake_amount": 0.05, + "tradable_balance_ratio": 0.99, + "fiat_display_currency": "USD", + "timeframe": "5m", + "dry_run": true, + "cancel_open_orders_on_exit": false, + "unfilledtimeout": { + "entry": 5, + "exit": 5, + "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": "your_exchange_key", + "secret": "your_exchange_secret", + "ccxt_config": {}, + "ccxt_async_config": {}, + "pair_whitelist": [ + "ETH/BTC", + "LTC/BTC", + "ETC/BTC", + "RVN/BTC", + "CRO/BTC", + "XLM/BTC", + "XRP/BTC", + "TRX/BTC", + "ADA/BTC", + "DOT/BTC" + ], + "pair_blacklist": [ + "DOGE/BTC" + ] + }, + "pairlists": [ + {"method": "StaticPairList"} + ], + "telegram": { + "enabled": false, + "token": "your_telegram_token", + "chat_id": "your_telegram_chat_id" + }, + "api_server": { + "enabled": false, + "listen_ip_address": "127.0.0.1", + "listen_port": 8080, + "verbosity": "error", + "jwt_secret_key": "somethingrandom", + "CORS_origins": [], + "username": "freqtrader", + "password": "SuperSecurePassword" + }, + "bot_name": "freqtrade", + "initial_state": "running", + "force_entry_enable": false, + "internals": { + "process_throttle_secs": 5 + } +} From fbc70a60f753d534fb5a040febb47ad30b017249 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 21 Nov 2023 06:57:18 +0100 Subject: [PATCH 07/10] Update test with no bittrex ... --- tests/exchange/test_exchange_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/exchange/test_exchange_utils.py b/tests/exchange/test_exchange_utils.py index 377514468..8ae4039c7 100644 --- a/tests/exchange/test_exchange_utils.py +++ b/tests/exchange/test_exchange_utils.py @@ -18,7 +18,7 @@ from tests.conftest import log_has_re def test_check_exchange(default_conf, caplog) -> None: # Test an officially supported by Freqtrade team exchange default_conf['runmode'] = RunMode.DRY_RUN - default_conf.get('exchange').update({'name': 'BITTREX'}) + default_conf.get('exchange').update({'name': 'BINANCE'}) assert check_exchange(default_conf) assert log_has_re(r"Exchange .* is officially supported by the Freqtrade development team\.", caplog) From f7178ecd6f3669d73012943baa39426d4d83b112 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 21 Nov 2023 07:10:23 +0100 Subject: [PATCH 08/10] Update test config name and exchange --- .github/workflows/ci.yml | 12 ++-- build_helpers/publish_docker_arm64.sh | 2 +- build_helpers/publish_docker_multi.sh | 2 +- tests/testdata/config_tests.example.json | 77 ------------------------ 4 files changed, 8 insertions(+), 85 deletions(-) delete mode 100644 tests/testdata/config_tests.example.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94f2a4461..a2f6567dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,7 +90,7 @@ jobs: - name: Backtesting (multi) run: | - cp tests/testdata/config_tests.example.json config.json + cp tests/testdata/config.tests.json config.json freqtrade create-userdir --userdir user_data freqtrade new-strategy -s AwesomeStrategy freqtrade new-strategy -s AwesomeStrategyMin --template minimal @@ -98,7 +98,7 @@ jobs: - name: Hyperopt run: | - cp tests/testdata/config_tests.example.json config.json + cp tests/testdata/config.tests.json config.json freqtrade create-userdir --userdir user_data freqtrade hyperopt --datadir tests/testdata -e 6 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all @@ -200,14 +200,14 @@ jobs: - name: Backtesting run: | - cp tests/testdata/config_tests.example.json config.json + cp tests/testdata/config.tests.json config.json freqtrade create-userdir --userdir user_data freqtrade new-strategy -s AwesomeStrategyAdv --template advanced freqtrade backtesting --datadir tests/testdata --strategy AwesomeStrategyAdv - name: Hyperopt run: | - cp tests/testdata/config_tests.example.json config.json + cp tests/testdata/config.tests.json config.json freqtrade create-userdir --userdir user_data freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all @@ -275,13 +275,13 @@ jobs: - name: Backtesting run: | - cp tests/testdata/config_tests.example.json config.json + cp tests/testdata/config.tests.json config.json freqtrade create-userdir --userdir user_data freqtrade backtesting --datadir tests/testdata --strategy SampleStrategy - name: Hyperopt run: | - cp tests/testdata/config_tests.example.json config.json + cp tests/testdata/config.tests.json config.json freqtrade create-userdir --userdir user_data freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all diff --git a/build_helpers/publish_docker_arm64.sh b/build_helpers/publish_docker_arm64.sh index c00de6c32..71fc01509 100755 --- a/build_helpers/publish_docker_arm64.sh +++ b/build_helpers/publish_docker_arm64.sh @@ -54,7 +54,7 @@ docker tag freqtrade:$TAG_FREQAI_ARM ${CACHE_IMAGE}:$TAG_FREQAI_ARM docker tag freqtrade:$TAG_FREQAI_RL_ARM ${CACHE_IMAGE}:$TAG_FREQAI_RL_ARM # Run backtest -docker run --rm -v $(pwd)/tests/testdata/config_tests.example.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests freqtrade:${TAG_ARM} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3 +docker run --rm -v $(pwd)/tests/testdata/config.tests.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests freqtrade:${TAG_ARM} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3 if [ $? -ne 0 ]; then echo "failed running backtest" diff --git a/build_helpers/publish_docker_multi.sh b/build_helpers/publish_docker_multi.sh index a4bf32c5a..34dc1faa3 100755 --- a/build_helpers/publish_docker_multi.sh +++ b/build_helpers/publish_docker_multi.sh @@ -67,7 +67,7 @@ docker tag freqtrade:$TAG_FREQAI ${CACHE_IMAGE}:$TAG_FREQAI docker tag freqtrade:$TAG_FREQAI_RL ${CACHE_IMAGE}:$TAG_FREQAI_RL # Run backtest -docker run --rm -v $(pwd)/tests/testdata/config_tests.example.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests freqtrade:${TAG} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3 +docker run --rm -v $(pwd)/tests/testdata/config.tests.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests freqtrade:${TAG} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3 if [ $? -ne 0 ]; then echo "failed running backtest" diff --git a/tests/testdata/config_tests.example.json b/tests/testdata/config_tests.example.json deleted file mode 100644 index c9ed89504..000000000 --- a/tests/testdata/config_tests.example.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "max_open_trades": 3, - "stake_currency": "BTC", - "stake_amount": 0.05, - "tradable_balance_ratio": 0.99, - "fiat_display_currency": "USD", - "timeframe": "5m", - "dry_run": true, - "cancel_open_orders_on_exit": false, - "unfilledtimeout": { - "entry": 5, - "exit": 5, - "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": "your_exchange_key", - "secret": "your_exchange_secret", - "ccxt_config": {}, - "ccxt_async_config": {}, - "pair_whitelist": [ - "ETH/BTC", - "LTC/BTC", - "ETC/BTC", - "RVN/BTC", - "CRO/BTC", - "XLM/BTC", - "XRP/BTC", - "TRX/BTC", - "ADA/BTC", - "DOT/BTC" - ], - "pair_blacklist": [ - "DOGE/BTC" - ] - }, - "pairlists": [ - {"method": "StaticPairList"} - ], - "telegram": { - "enabled": false, - "token": "your_telegram_token", - "chat_id": "your_telegram_chat_id" - }, - "api_server": { - "enabled": false, - "listen_ip_address": "127.0.0.1", - "listen_port": 8080, - "verbosity": "error", - "jwt_secret_key": "somethingrandom", - "CORS_origins": [], - "username": "freqtrader", - "password": "SuperSecurePassword" - }, - "bot_name": "freqtrade", - "initial_state": "running", - "force_entry_enable": false, - "internals": { - "process_throttle_secs": 5 - } -} From fbab18b0819fa0881c2a438eff32827dee38aa88 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 21 Nov 2023 18:01:18 +0100 Subject: [PATCH 09/10] Add missing config file --- tests/testdata/config.tests.json | 77 ++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 tests/testdata/config.tests.json diff --git a/tests/testdata/config.tests.json b/tests/testdata/config.tests.json new file mode 100644 index 000000000..19a0e91d5 --- /dev/null +++ b/tests/testdata/config.tests.json @@ -0,0 +1,77 @@ +{ + "max_open_trades": 3, + "stake_currency": "BTC", + "stake_amount": 0.05, + "tradable_balance_ratio": 0.99, + "fiat_display_currency": "USD", + "timeframe": "5m", + "dry_run": true, + "cancel_open_orders_on_exit": false, + "unfilledtimeout": { + "entry": 5, + "exit": 5, + "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": "gate", + "key": "your_exchange_key", + "secret": "your_exchange_secret", + "ccxt_config": {}, + "ccxt_async_config": {}, + "pair_whitelist": [ + "ETH/BTC", + "LTC/BTC", + "ETC/BTC", + "RVN/BTC", + "CRO/BTC", + "XLM/BTC", + "XRP/BTC", + "TRX/BTC", + "ADA/BTC", + "DOT/BTC" + ], + "pair_blacklist": [ + "DOGE/BTC" + ] + }, + "pairlists": [ + {"method": "StaticPairList"} + ], + "telegram": { + "enabled": false, + "token": "your_telegram_token", + "chat_id": "your_telegram_chat_id" + }, + "api_server": { + "enabled": false, + "listen_ip_address": "127.0.0.1", + "listen_port": 8080, + "verbosity": "error", + "jwt_secret_key": "somethingrandom", + "CORS_origins": [], + "username": "freqtrader", + "password": "SuperSecurePassword" + }, + "bot_name": "freqtrade", + "initial_state": "running", + "force_entry_enable": false, + "internals": { + "process_throttle_secs": 5 + } +} From 203890844b661f84ffec376ca72fca97d2f856bd Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 21 Nov 2023 19:04:38 +0100 Subject: [PATCH 10/10] Remove non-existing pairs --- tests/testdata/config.tests.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/testdata/config.tests.json b/tests/testdata/config.tests.json index 19a0e91d5..fdfa97350 100644 --- a/tests/testdata/config.tests.json +++ b/tests/testdata/config.tests.json @@ -38,11 +38,8 @@ "ETH/BTC", "LTC/BTC", "ETC/BTC", - "RVN/BTC", - "CRO/BTC", "XLM/BTC", "XRP/BTC", - "TRX/BTC", "ADA/BTC", "DOT/BTC" ],