Merge pull request #3519 from freqtrade/fix/trades_download_older

dl-trades should also support increasing download span
This commit is contained in:
hroff-1902
2020-06-27 00:08:10 +03:00
committed by GitHub
3 changed files with 28 additions and 1 deletions

View File

@@ -270,6 +270,11 @@ def _download_trades_history(exchange: Exchange,
# DEFAULT_TRADES_COLUMNS: 0 -> timestamp
# DEFAULT_TRADES_COLUMNS: 1 -> id
if trades and since < trades[0][0]:
# since is before the first trade
logger.info(f"Start earlier than available data. Redownloading trades for {pair}...")
trades = []
from_id = trades[-1][1] if trades else None
if trades and since < trades[-1][0]:
# Reset since to the last available point