chore: allow non-matching funding timeframe - as timeframe doesn't actually matter any longer.

This commit is contained in:
Matthias
2025-12-06 13:53:18 +01:00
parent 07fbf2b467
commit 17009ac59f

View File

@@ -2698,7 +2698,7 @@ class Exchange:
CandleType.SPOT, CandleType.SPOT,
CandleType.FUTURES, CandleType.FUTURES,
) )
if invalid_timeframe or invalid_funding: if invalid_timeframe:
timeframes_ = ( timeframes_ = (
", ".join(self.timeframes) ", ".join(self.timeframes)
if candle_type != CandleType.FUNDING_RATE if candle_type != CandleType.FUNDING_RATE
@@ -2710,6 +2710,13 @@ class Exchange:
f"{timeframes_}." f"{timeframes_}."
) )
continue continue
if invalid_funding:
# TODO: does this message make sense? would docs be better?
# if any, this should be cached to avoid log spam!
logger.warning(
f"Wrong funding rate timeframe {timeframe} for pair {pair}, "
f"downloading {self.get_option('funding_fee_timeframe')} instead."
)
if ( if (
(pair, timeframe, candle_type) not in self._klines (pair, timeframe, candle_type) not in self._klines