default since_ms to 30 days if no timerange is given
This commit is contained in:
parent
a107c4c7b4
commit
a852d2ff32
@ -366,7 +366,7 @@ class Exchange(object):
|
|||||||
tickers = await asyncio.gather(*input_coroutines, return_exceptions=True)
|
tickers = await asyncio.gather(*input_coroutines, return_exceptions=True)
|
||||||
|
|
||||||
# Combine tickers
|
# Combine tickers
|
||||||
data = []
|
data: List = []
|
||||||
for tick in tickers:
|
for tick in tickers:
|
||||||
if tick[0] == pair:
|
if tick[0] == pair:
|
||||||
data.extend(tick[1])
|
data.extend(tick[1])
|
||||||
|
@ -218,8 +218,11 @@ def download_backtesting_testdata(datadir: str,
|
|||||||
logger.debug("Current Start: %s", misc.format_ms_time(data[1][0]) if data else 'None')
|
logger.debug("Current Start: %s", misc.format_ms_time(data[1][0]) if data else 'None')
|
||||||
logger.debug("Current End: %s", misc.format_ms_time(data[-1][0]) if data else 'None')
|
logger.debug("Current End: %s", misc.format_ms_time(data[-1][0]) if data else 'None')
|
||||||
|
|
||||||
|
# Default since_ms to 30 days if nothing is given
|
||||||
new_data = exchange.get_history(pair=pair, tick_interval=tick_interval,
|
new_data = exchange.get_history(pair=pair, tick_interval=tick_interval,
|
||||||
since_ms=since_ms)
|
since_ms=since_ms if since_ms
|
||||||
|
else
|
||||||
|
int(arrow.utcnow().shift(days=-30).float_timestamp) * 1000)
|
||||||
data.extend(new_data)
|
data.extend(new_data)
|
||||||
|
|
||||||
logger.debug("New Start: %s", misc.format_ms_time(data[0][0]))
|
logger.debug("New Start: %s", misc.format_ms_time(data[0][0]))
|
||||||
|
Loading…
Reference in New Issue
Block a user