fix: deduplicate list before downloading

This avoids duplicate downloads, for example on hyperliquid, which uses "futures" as mark candle type.
This commit is contained in:
Matthias
2025-12-09 13:54:05 +01:00
parent 645a9159e4
commit bbafb1dabd

View File

@@ -407,7 +407,8 @@ def refresh_backtest_ohlcv_data(
# All exchanges need FundingRate for futures trading.
# The timeframe is aligned to the mark-price timeframe.
timeframes_with_candletype.append((tf_funding_rate, CandleType.FUNDING_RATE))
# Deduplicate list ...
timeframes_with_candletype = list(dict.fromkeys(timeframes_with_candletype))
logger.debug(
"Downloading %s.", ", ".join(f'"{tf} {ct}"' for tf, ct in timeframes_with_candletype)
)