From fc0cae21e61e5aee721345cc4131234df493bf33 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 1 Feb 2025 13:49:17 +0100 Subject: [PATCH] fix: improve reliability when fetching from "features" --- freqtrade/exchange/exchange.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 1eaae5424..b7d94e277 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -470,6 +470,8 @@ class Exchange: ccxt_val = self.features( "spot" if candle_type == CandleType.SPOT else "futures", "fetchOHLCV", "limit", 500 ) + if not isinstance(ccxt_val, float | int): + ccxt_val = 500 fallback_val = self._ft_has.get("ohlcv_candle_limit", ccxt_val) if candle_type == CandleType.FUNDING_RATE: fallback_val = self._ft_has.get("funding_fee_candle_limit", fallback_val)