Implement progress tracker to trades download
This commit is contained in:
@@ -509,7 +509,10 @@ def refresh_backtest_trades_data(
|
||||
"""
|
||||
pairs_not_available = []
|
||||
data_handler = get_datahandler(datadir, data_format=data_format)
|
||||
with get_progress_tracker() as progress:
|
||||
pair_task = progress.add_task("Downloading data...", total=len(pairs))
|
||||
for pair in pairs:
|
||||
progress.update(pair_task, description=f"Downloading trades [{pair}]")
|
||||
if pair not in exchange.markets:
|
||||
pairs_not_available.append(pair)
|
||||
logger.info(f"Skipping pair {pair}...")
|
||||
@@ -528,6 +531,8 @@ def refresh_backtest_trades_data(
|
||||
data_handler=data_handler,
|
||||
trading_mode=trading_mode,
|
||||
)
|
||||
progress.update(pair_task, advance=1)
|
||||
|
||||
return pairs_not_available
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user