[1/3] Add support for multiple exchanges with ccxt (objectified version) (#585)

* remove obsolete helper functions and make _state a public member.

* remove function assertions

* revert worker() changes

* Update pytest from 3.4.2 to 3.5.0

* Adapt exchange functions to ccxt API
Remove get_market_summaries and get_wallet_health, add exception handling

* Add NetworkException

* Change pair format in constants.py

* Add tests for exchange functions that comply with ccxt

* Remove bittrex tests

* Remove Bittrex and Interface classes

* Add retrier decorator

* Remove cache from get_ticker

* Remove unused and duplicate imports

* Add keyword arguments for get_fee

* Implement 'get_pair_detail_url'

* Change get_ticker_history format to ccxt format

* Fix exchange urls dict, don't need to initialize exchanges

* Add "Using Exchange ..." logging line
This commit is contained in:
enenn
2018-04-06 09:57:08 +02:00
committed by Samuel Husso
parent f3847a3a9a
commit 1f75636e56
12 changed files with 586 additions and 486 deletions

View File

@@ -6,6 +6,7 @@ This module contains the backtesting logic
from argparse import Namespace
from typing import Dict, Tuple, Any, List, Optional
import ccxt
import arrow
from pandas import DataFrame, Series
from tabulate import tabulate
@@ -16,7 +17,6 @@ from freqtrade import exchange
from freqtrade.analyze import Analyze
from freqtrade.arguments import Arguments
from freqtrade.configuration import Configuration
from freqtrade.logger import Logger
from freqtrade.misc import file_dump_json
from freqtrade.persistence import Trade
@@ -53,7 +53,8 @@ class Backtesting(object):
self.tickerdata_to_dataframe = self.analyze.tickerdata_to_dataframe
self.populate_buy_trend = self.analyze.populate_buy_trend
self.populate_sell_trend = self.analyze.populate_sell_trend
# Reest keys for backtesting
# Reset keys for backtesting
self.config['exchange']['key'] = ''
self.config['exchange']['secret'] = ''
exchange.init(self.config)