Merge pull request #12311 from freqtrade/fix/allow-override

fix: Allow users to override the exchange check for FreqAI incase the…
This commit is contained in:
Matthias
2025-10-05 08:09:28 +02:00
committed by GitHub
3 changed files with 21 additions and 1 deletions

View File

@@ -832,10 +832,16 @@ 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."
)
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:
"""