From 8c92f9407dd6240402d5cc33bbefbf1e57eb28d7 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 28 Aug 2025 06:50:08 +0200 Subject: [PATCH] chore: use candle_type as argument for parallel-download --- freqtrade/data/history/history_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freqtrade/data/history/history_utils.py b/freqtrade/data/history/history_utils.py index 54f17dece..68f1a5c4d 100644 --- a/freqtrade/data/history/history_utils.py +++ b/freqtrade/data/history/history_utils.py @@ -399,7 +399,7 @@ def refresh_backtest_ohlcv_data( exchange=exchange, pairs=pairs, timeframe=timeframe, - trading_mode=trading_mode, + candle_type=candle_type, timerange=timerange, ) ) @@ -461,7 +461,7 @@ def _download_all_pairs_history_parallel( exchange: Exchange, pairs: list[str], timeframe: str, - trading_mode: str, + candle_type: CandleType, timerange: TimeRange | None = None, ) -> dict[PairWithTimeframe, DataFrame]: """ @@ -476,7 +476,7 @@ def _download_all_pairs_history_parallel( if timerange.starttype == "date": since = timerange.startts * 1000 - candle_limit = exchange.ohlcv_candle_limit(timeframe, CandleType.get_default(trading_mode)) + candle_limit = exchange.ohlcv_candle_limit(timeframe, candle_type) one_call_min_time_dt = dt_ts(date_minus_candles(timeframe, candle_limit)) # check if we can get all candles in one go, if so then we can download them in parallel if since > one_call_min_time_dt: @@ -485,7 +485,7 @@ def _download_all_pairs_history_parallel( f"since {format_ms_time(since)}" ) needed_pairs: ListPairsWithTimeframes = [ - (p, timeframe, CandleType.get_default(trading_mode)) for p in [p for p in pairs] + (p, timeframe, candle_type) for p in [p for p in pairs] ] candles = exchange.refresh_latest_ohlcv(needed_pairs, since_ms=since, cache=False)