chore: minor adjustments for clarity

This commit is contained in:
Matthias
2025-12-07 20:01:08 +01:00
parent c1c968666e
commit e6030b7f59
2 changed files with 2 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ def ohlcv_to_dataframe(
cols = DEFAULT_DATAFRAME_COLUMNS
df = DataFrame(ohlcv, columns=cols)
# Floor date to seconds to account for exchange imprecisions
df["date"] = to_datetime(df["date"], unit="ms", utc=True).dt.floor("s")
# Some exchanges return int values for Volume and even for OHLC.

View File

@@ -350,7 +350,7 @@ class DataProvider:
def __fix_funding_rate_timeframe(
self, pair: str, timeframe: str | None, candle_type: str
) -> str:
) -> str | None:
if (
candle_type == CandleType.FUNDING_RATE
and (ff_tf := self.get_funding_rate_timeframe()) != timeframe