diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 107d13a25..23fe8f86f 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -73,7 +73,7 @@ def get_sell_trade_entry(pair, row, buy_subset, ticker, trade_count_lock, args): open_date=row.date, stake_amount=stake_amount, amount=stake_amount / row.open, - fee=exchange.get_fee() + fee=exchange.get_fee_taker() ) # calculate win/lose forwards from buy point @@ -113,7 +113,6 @@ def backtest(args) -> DataFrame: records = [] trades = [] trade_count_lock: dict = {} - exchange._API = Bittrex({'key': '', 'secret': ''}) for pair, pair_data in processed.items(): pair_data['buy'], pair_data['sell'] = 0, 0 ticker = populate_sell_trend(populate_buy_trend(pair_data)) @@ -164,13 +163,14 @@ def start(args): format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', ) - exchange._API = Bittrex({'key': '', 'secret': ''}) - logger.info('Using config: %s ...', args.config) config = misc.load_config(args.config) ticker_interval = config.get('ticker_interval', args.ticker_interval) logger.info('Using ticker_interval: %s ...', ticker_interval) - + # patch config to no key + config['key'] = '' + config['secret'] = '' + exchange.init(config) data = {} pairs = config['exchange']['pair_whitelist'] if args.live: