From 19f3669fbd32f74ca2f82b408ed44b9ae306dcbc Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 25 Aug 2019 14:30:09 +0200 Subject: [PATCH] add docstring --- freqtrade/data/history.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/freqtrade/data/history.py b/freqtrade/data/history.py index f2960e627..f5a1527f8 100644 --- a/freqtrade/data/history.py +++ b/freqtrade/data/history.py @@ -334,7 +334,10 @@ def download_trades_history(datadir: Optional[Path], pair: str, ticker_interval: str = '5m', timerange: Optional[TimeRange] = None) -> bool: - + """ + Download trade history from the exchange. + Appends to previously downloaded trades data. + """ if not exchange: raise OperationalException( "Exchange needs to be initialized to download data") @@ -350,12 +353,12 @@ def download_trades_history(datadir: Optional[Path], logger.debug("Current End: %s", trades[-1]['datetime'] if trades else 'None') new_trades = exchange.get_historic_trades(pair=pair, - since=since if since else - int(arrow.utcnow().shift( - days=-30).float_timestamp) * 1000, - # until=xxx, - from_id=from_id, - ) + since=since if since else + int(arrow.utcnow().shift( + days=-30).float_timestamp) * 1000, + # until=xxx, + from_id=from_id, + ) trades.extend(new_trades[1]) store_trades_file(datadir, pair, trades)