From 92e64927b01b3c7d295ea953a140caa76d4e0bc5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 26 Nov 2024 07:02:54 +0100 Subject: [PATCH] feat: allow object as dry-run balance --- build_helpers/schema.json | 13 +++++++++++-- freqtrade/configuration/config_schema.py | 4 +++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/build_helpers/schema.json b/build_helpers/schema.json index e12b0bf0d..73c06ba46 100644 --- a/build_helpers/schema.json +++ b/build_helpers/schema.json @@ -102,8 +102,17 @@ }, "dry_run_wallet": { "description": "Initial wallet balance for dry run mode.", - "type": "number", - "default": 1000 + "type": [ + "number", + "object" + ], + "default": 1000, + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "type": "number" + } + }, + "additionalProperties": false }, "cancel_open_orders_on_exit": { "description": "Cancel open orders when exiting.", diff --git a/freqtrade/configuration/config_schema.py b/freqtrade/configuration/config_schema.py index 30f1f6f28..d31069e7b 100644 --- a/freqtrade/configuration/config_schema.py +++ b/freqtrade/configuration/config_schema.py @@ -85,8 +85,10 @@ CONF_SCHEMA = { }, "dry_run_wallet": { "description": "Initial wallet balance for dry run mode.", - "type": "number", + "type": ["number", "object"], "default": DRY_RUN_WALLET, + "patternProperties": {r"^[a-zA-Z0-9]+$": {"type": "number"}}, + "additionalProperties": False, }, "cancel_open_orders_on_exit": { "description": "Cancel open orders when exiting.",