From 8eeb02e592551a2ff6bc53f2e774e02f71f7c9f0 Mon Sep 17 00:00:00 2001 From: gcarq Date: Tue, 7 Nov 2017 18:59:47 +0100 Subject: [PATCH] make ticker interval configurable --- freqtrade/tests/testdata/download_backtest_data.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/freqtrade/tests/testdata/download_backtest_data.py b/freqtrade/tests/testdata/download_backtest_data.py index 16f4c0802..b1508aed7 100755 --- a/freqtrade/tests/testdata/download_backtest_data.py +++ b/freqtrade/tests/testdata/download_backtest_data.py @@ -8,13 +8,17 @@ from freqtrade import exchange from freqtrade.exchange import Bittrex PAIRS = ['BTC-OK', 'BTC-NEO', 'BTC-DASH', 'BTC-ETC', 'BTC-ETH', 'BTC-SNT'] +TICKER_INTERVAL = 1 # ticker interval in minutes (currently implemented: 1 and 5) OUTPUT_DIR = path.dirname(path.realpath(__file__)) # Init Bittrex exchange exchange._API = Bittrex({'key': '', 'secret': ''}) for pair in PAIRS: - data = exchange.get_ticker_history(pair) - filename = path.join(OUTPUT_DIR, '{}.json'.format(pair.lower())) + data = exchange.get_ticker_history(pair, TICKER_INTERVAL) + filename = path.join(OUTPUT_DIR, '{}-{}m.json'.format( + pair.lower(), + TICKER_INTERVAL, + )) with open(filename, 'w') as fp: json.dump(data, fp)