From 60a7f8614c003cae8fb9ba1fe99f1ce377997b24 Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Tue, 10 Oct 2017 19:04:05 +0300 Subject: [PATCH 1/4] upgrade dependencies --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index b7bf943ad..be3a292f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -e git+https://github.com/ericsomdahl/python-bittrex.git@d7033d0#egg=python-bittrex -SQLAlchemy==1.1.13 +SQLAlchemy==1.1.14 python-telegram-bot==8.0 arrow==0.10.0 requests==2.18.4 @@ -11,10 +11,10 @@ scipy==0.19.1 jsonschema==2.6.0 numpy==1.13.3 TA-Lib==0.4.10 -pytest==3.2.2 +pytest==3.2.3 pytest-mock==1.6.3 pytest-cov==2.5.1 # Required for plotting data -#matplotlib==2.0.2 +#matplotlib==2.1.0 #PYQT5==5.9 \ No newline at end of file From 0c8c149b86c2097c0e1889ab86a86c2b6c8889ce Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Wed, 11 Oct 2017 13:09:57 +0300 Subject: [PATCH 2/4] Fix the command for running backtesting in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d9eb017ff..5779d983a 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ $ pytest This will by default skip the slow running backtest set. To run backtest set: ``` -$ BACKTEST=true pytest +$ BACKTEST=true pytest -s freqtrade/tests/test_backtesting.py ``` #### Docker From d76476040a016de39259561d852e38844586137b Mon Sep 17 00:00:00 2001 From: xsmile Date: Wed, 11 Oct 2017 19:51:37 +0200 Subject: [PATCH 3/4] Bittrex provider remove redundant 'name' property and pair validation call --- freqtrade/exchange/bittrex.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/freqtrade/exchange/bittrex.py b/freqtrade/exchange/bittrex.py index d2fd08ddc..cb85aaf87 100644 --- a/freqtrade/exchange/bittrex.py +++ b/freqtrade/exchange/bittrex.py @@ -26,10 +26,6 @@ class Bittrex(Exchange): # Sleep time to avoid rate limits, used in the main loop SLEEP_TIME: float = 25 - @property - def name(self) -> str: - return self.__class__.__name__ - @property def sleep_time(self) -> float: return self.SLEEP_TIME @@ -40,13 +36,6 @@ class Bittrex(Exchange): _EXCHANGE_CONF.update(config) _API = _Bittrex(api_key=_EXCHANGE_CONF['key'], api_secret=_EXCHANGE_CONF['secret']) - # Check if all pairs are available - markets = self.get_markets() - exchange_name = self.name - for pair in _EXCHANGE_CONF['pair_whitelist']: - if pair not in markets: - raise RuntimeError('Pair {} is not available at {}'.format(pair, exchange_name)) - def buy(self, pair: str, rate: float, amount: float) -> str: data = _API.buy_limit(pair.replace('_', '-'), amount, rate) if not data['success']: From eecc45f8ba8baae71fc4902a09d221dd40b22102 Mon Sep 17 00:00:00 2001 From: xsmile Date: Wed, 11 Oct 2017 20:04:31 +0200 Subject: [PATCH 4/4] set exchange in analyze.__main__ to fix plotting requires #64 --- freqtrade/analyze.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/freqtrade/analyze.py b/freqtrade/analyze.py index 159e1d137..f4f6d0077 100644 --- a/freqtrade/analyze.py +++ b/freqtrade/analyze.py @@ -6,7 +6,8 @@ import arrow import talib.abstract as ta from pandas import DataFrame -from freqtrade.exchange import get_ticker_history +from freqtrade import exchange +from freqtrade.exchange import Bittrex, get_ticker_history logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') @@ -143,6 +144,7 @@ def plot_dataframe(dataframe: DataFrame, pair: str) -> None: if __name__ == '__main__': # Install PYQT5==5.9 manually if you want to test this helper function while True: + exchange.EXCHANGE = Bittrex({'key': '', 'secret': ''}) test_pair = 'BTC_ETH' # for pair in ['BTC_ANT', 'BTC_ETH', 'BTC_GNT', 'BTC_ETC']: # get_buy_signal(pair)