@@ -399,7 +399,7 @@ def refresh_backtest_ohlcv_data(
399399 exchange = exchange ,
400400 pairs = pairs ,
401401 timeframe = timeframe ,
402- trading_mode = trading_mode ,
402+ candle_type = candle_type ,
403403 timerange = timerange ,
404404 )
405405 )
@@ -461,7 +461,7 @@ def _download_all_pairs_history_parallel(
461461 exchange : Exchange ,
462462 pairs : list [str ],
463463 timeframe : str ,
464- trading_mode : str ,
464+ candle_type : CandleType ,
465465 timerange : TimeRange | None = None ,
466466) -> dict [PairWithTimeframe , DataFrame ]:
467467 """
@@ -476,7 +476,7 @@ def _download_all_pairs_history_parallel(
476476 if timerange .starttype == "date" :
477477 since = timerange .startts * 1000
478478
479- candle_limit = exchange .ohlcv_candle_limit (timeframe , CandleType . get_default ( trading_mode ) )
479+ candle_limit = exchange .ohlcv_candle_limit (timeframe , candle_type )
480480 one_call_min_time_dt = dt_ts (date_minus_candles (timeframe , candle_limit ))
481481 # check if we can get all candles in one go, if so then we can download them in parallel
482482 if since > one_call_min_time_dt :
@@ -485,7 +485,7 @@ def _download_all_pairs_history_parallel(
485485 f"since { format_ms_time (since )} "
486486 )
487487 needed_pairs : ListPairsWithTimeframes = [
488- (p , timeframe , CandleType . get_default ( trading_mode ) ) for p in [p for p in pairs ]
488+ (p , timeframe , candle_type ) for p in [p for p in pairs ]
489489 ]
490490 candles = exchange .refresh_latest_ohlcv (needed_pairs , since_ms = since , cache = False )
491491
0 commit comments