diff --git a/freqtrade/data/history/history_utils.py b/freqtrade/data/history/history_utils.py index 5bb89069b..5175195c5 100644 --- a/freqtrade/data/history/history_utils.py +++ b/freqtrade/data/history/history_utils.py @@ -357,9 +357,6 @@ def _download_trades_history(exchange: Exchange, f"available data. Redownloading trades for {pair}...") trades = trades_list_to_df([]) - if not since: - since = dt_ts(dt_now() - timedelta(days=new_pairs_days)) - from_id = trades.iloc[-1]['id'] if not trades.empty else None if not trades.empty and since < trades.iloc[-1]['timestamp']: # Reset since to the last available point @@ -368,6 +365,9 @@ def _download_trades_history(exchange: Exchange, logger.info(f"Using last trade date -5s - Downloading trades for {pair} " f"since: {format_ms_time(since)}.") + if not since: + since = dt_ts(dt_now() - timedelta(days=new_pairs_days)) + logger.debug("Current Start: %s", 'None' if trades.empty else f"{trades.iloc[0]['date']:{DATETIME_PRINT_FORMAT}}") logger.debug("Current End: %s", 'None' if trades.empty else