mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
fix: improve reliability when fetching from "features"
This commit is contained in:
@@ -470,6 +470,8 @@ class Exchange:
|
|||||||
ccxt_val = self.features(
|
ccxt_val = self.features(
|
||||||
"spot" if candle_type == CandleType.SPOT else "futures", "fetchOHLCV", "limit", 500
|
"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)
|
fallback_val = self._ft_has.get("ohlcv_candle_limit", ccxt_val)
|
||||||
if candle_type == CandleType.FUNDING_RATE:
|
if candle_type == CandleType.FUNDING_RATE:
|
||||||
fallback_val = self._ft_has.get("funding_fee_candle_limit", fallback_val)
|
fallback_val = self._ft_has.get("funding_fee_candle_limit", fallback_val)
|
||||||
|
|||||||
Reference in New Issue
Block a user