Skip to content

Commit e33363b

Browse files
committed
feat: allow disabling parallel data-download per exchange
1 parent eaf3fc8 commit e33363b

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

freqtrade/data/history/history_utils.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,10 +388,14 @@ def refresh_backtest_ohlcv_data(
388388
for timeframe in timeframes:
389389
# Get fast candles via parallel method on first loop through per timeframe
390390
# and candle type. Downloads all the pairs in the list and stores them.
391-
if not no_parallel_download and (
392-
((pair, timeframe, candle_type) not in fast_candles)
393-
and (erase is False)
394-
and (prepend is False)
391+
if (
392+
not no_parallel_download
393+
and exchange.get_option("download_data_parallel_quick", True)
394+
and (
395+
((pair, timeframe, candle_type) not in fast_candles)
396+
and (erase is False)
397+
and (prepend is False)
398+
)
395399
):
396400
fast_candles.update(
397401
_download_all_pairs_history_parallel(

freqtrade/exchange/exchange.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ class Exchange:
137137
"ohlcv_has_history": True, # Some exchanges (Kraken) don't provide history via ohlcv
138138
"ohlcv_partial_candle": True,
139139
"ohlcv_require_since": False,
140+
"download_data_parallel_quick": True,
140141
"always_require_api_keys": False, # purge API keys for Dry-run. Must default to false.
141142
# Check https://github.com/ccxt/ccxt/issues/10767 for removal of ohlcv_volume_currency
142143
"ohlcv_volume_currency": "base", # "base" or "quote"

freqtrade/exchange/exchange_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class FtHas(TypedDict, total=False):
2525
ohlcv_volume_currency: str
2626
ohlcv_candle_limit_per_timeframe: dict[str, int]
2727
always_require_api_keys: bool
28+
# allow disabling of parallel download-data for specific exchanges
29+
download_data_parallel_quick: bool
2830
# Tickers
2931
tickers_have_quoteVolume: bool
3032
tickers_have_percentage: bool

freqtrade/exchange/hyperliquid.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Hyperliquid(Exchange):
2828
"stoploss_on_exchange": False,
2929
"exchange_has_overrides": {"fetchTrades": False},
3030
"marketOrderRequiresPrice": True,
31+
"download_data_parallel_quick": False,
3132
"ws_enabled": True,
3233
}
3334
_ft_has_futures: FtHas = {

0 commit comments

Comments
 (0)