fix: floor funding-rate to seconds to account for slight time offset

This commit is contained in:
Matthias
2025-12-03 06:55:56 +01:00
parent 271fc6b585
commit d41acc77f7

View File

@@ -397,6 +397,9 @@ class IDataHandler(ABC):
pairdf = self._ohlcv_load(
pair, timeframe, timerange=timerange_startup, candle_type=candle_type
)
if not pairdf.empty and candle_type == CandleType.FUNDING_RATE:
# Funding rate data is sometimes off by a couple of ms - floor to seconds
pairdf["date"] = pairdf["date"].dt.floor("s")
if self._check_empty_df(pairdf, pair, timeframe, candle_type, warn_no_data):
return pairdf
else: