fix: problem in ohlcv_with_cache

This commit is contained in:
Matthias
2026-01-31 19:55:03 +01:00
parent 26aed91bbf
commit 0ef85e161e

View File

@@ -2896,8 +2896,11 @@ class Exchange:
}
pairs_to_download = [p for p in pairs if p not in candles]
if pairs_to_download:
candles = self.refresh_latest_ohlcv(pairs_to_download, since_ms=since_ms, cache=False)
for c, val in candles.items():
candles_new = self.refresh_latest_ohlcv(
pairs_to_download, since_ms=since_ms, cache=False
)
for c, val in candles_new.items():
candles[c] = val
self._expiring_candle_cache[(c[1], since_ms)][c] = val
return candles