From 8d86cc1173cb9967a113429747908d977fd5c72f Mon Sep 17 00:00:00 2001 From: Robert Caulk Date: Wed, 1 Oct 2025 16:34:10 +0200 Subject: [PATCH 1/3] fix: Allow users to override the exchange check for FreqAI incase they know that they dont need historic data for their system --- build_helpers/schema.json | 5 +++++ freqtrade/config_schema/config_schema.py | 9 +++++++++ freqtrade/exchange/exchange.py | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/build_helpers/schema.json b/build_helpers/schema.json index b644bc2f9..08b113d79 100644 --- a/build_helpers/schema.json +++ b/build_helpers/schema.json @@ -1461,6 +1461,11 @@ "type": "boolean", "default": false }, + "override_exchange_check": { + "description": "Override the exchange check to force FreqAI to use exchangesthat may not have enough historic data. Turn this to True if you know your FreqAI model and strategy do not require historical data.", + "type": "boolean", + "default": false + }, "feature_parameters": { "description": "The parameters used to engineer the feature set", "type": "object", diff --git a/freqtrade/config_schema/config_schema.py b/freqtrade/config_schema/config_schema.py index 8274c161b..d694ea3fc 100644 --- a/freqtrade/config_schema/config_schema.py +++ b/freqtrade/config_schema/config_schema.py @@ -1142,6 +1142,15 @@ CONF_SCHEMA = { "type": "boolean", "default": False, }, + "override_exchange_check": { + "description": ( + "Override the exchange check to force FreqAI to use exchanges" + "that may not have enough historic data. Turn this to True if " + "you know your FreqAI model and strategy do not require historical data." + ), + "type": "boolean", + "default": False, + }, "feature_parameters": { "description": "The parameters used to engineer the feature set", "type": "object", diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 57e1352a0..6c6b60928 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -832,7 +832,8 @@ class Exchange: def validate_freqai(self, config: Config) -> None: freqai_enabled = config.get("freqai", {}).get("enabled", False) - if freqai_enabled and not self._ft_has["ohlcv_has_history"]: + override = config.get("freqai", {}).get("override_exchange_checks", False) + if not override and freqai_enabled and not self._ft_has["ohlcv_has_history"]: raise ConfigurationError( f"Historic OHLCV data not available for {self.name}. Can't use freqAI." ) From 70fa12f1b2b722cd79c9b65d513f08de2661e8a0 Mon Sep 17 00:00:00 2001 From: Robert Caulk Date: Wed, 1 Oct 2025 16:36:55 +0200 Subject: [PATCH 2/3] chore: log a warning that the user is in territory that might not work. --- freqtrade/exchange/exchange.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 6c6b60928..22694f62f 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -837,6 +837,11 @@ class Exchange: raise ConfigurationError( f"Historic OHLCV data not available for {self.name}. Can't use freqAI." ) + elif override and freqai_enabled and not self._ft_has["ohlcv_has_history"]: + logger.warning( + "Overriding exchange checks for freqAI. Make sure that your exchange supports " + "fetching historic OHLCV data, otherwise freqAI will not work." + ) def validate_required_startup_candles(self, startup_candles: int, timeframe: str) -> int: """ From 2d40807b6658bb7e2e371f645208d8476bb3f9cd Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 5 Oct 2025 07:56:42 +0200 Subject: [PATCH 3/3] chore: fix description typo --- build_helpers/schema.json | 2 +- freqtrade/config_schema/config_schema.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build_helpers/schema.json b/build_helpers/schema.json index 08b113d79..974ae0431 100644 --- a/build_helpers/schema.json +++ b/build_helpers/schema.json @@ -1462,7 +1462,7 @@ "default": false }, "override_exchange_check": { - "description": "Override the exchange check to force FreqAI to use exchangesthat may not have enough historic data. Turn this to True if you know your FreqAI model and strategy do not require historical data.", + "description": "Override the exchange check to force FreqAI to use exchanges that may not have enough historic data. Turn this to True if you know your FreqAI model and strategy do not require historical data.", "type": "boolean", "default": false }, diff --git a/freqtrade/config_schema/config_schema.py b/freqtrade/config_schema/config_schema.py index d694ea3fc..c9425d6cb 100644 --- a/freqtrade/config_schema/config_schema.py +++ b/freqtrade/config_schema/config_schema.py @@ -1144,7 +1144,7 @@ CONF_SCHEMA = { }, "override_exchange_check": { "description": ( - "Override the exchange check to force FreqAI to use exchanges" + "Override the exchange check to force FreqAI to use exchanges " "that may not have enough historic data. Turn this to True if " "you know your FreqAI model and strategy do not require historical data." ),