From 2b0ef5459546a99a7e753cf55427490493fc8c99 Mon Sep 17 00:00:00 2001 From: xmatthias Date: Mon, 18 Jun 2018 22:28:51 +0200 Subject: [PATCH] update download_script for exchange objectify --- scripts/download_backtest_data.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/scripts/download_backtest_data.py b/scripts/download_backtest_data.py index 9aedbecb9..2f76c1232 100755 --- a/scripts/download_backtest_data.py +++ b/scripts/download_backtest_data.py @@ -6,7 +6,8 @@ import sys import os import arrow -from freqtrade import (exchange, arguments, misc) +from freqtrade import (arguments, misc) +from freqtrade.exchange import Exchange DEFAULT_DL_PATH = 'user_data/data' @@ -39,16 +40,21 @@ if args.days: print(f'About to download pairs: {PAIRS} to {dl_path}') + # Init exchange -exchange._API = exchange.init_ccxt({'key': '', - 'secret': '', - 'name': args.exchange}) +exchange = Exchange({'key': '', + 'secret': '', + 'stake_currency': '', + 'dry_run': True, + 'exchange': { + 'name': args.exchange, + 'pair_whitelist': [] + } + }) pairs_not_available = [] -# Make sure API markets is initialized -exchange._API.load_markets() for pair in PAIRS: - if pair not in exchange._API.markets: + if pair not in exchange._api.markets: pairs_not_available.append(pair) print(f"skipping pair {pair}") continue