Merge e7df373544
into 604a888791
This commit is contained in:
commit
da7c7cc461
@ -84,7 +84,7 @@ $ pytest
|
|||||||
This will by default skip the slow running backtest set. To run backtest set:
|
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
|
#### Docker
|
||||||
|
@ -6,7 +6,8 @@ import arrow
|
|||||||
import talib.abstract as ta
|
import talib.abstract as ta
|
||||||
from pandas import DataFrame
|
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,
|
logging.basicConfig(level=logging.DEBUG,
|
||||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||||
@ -143,6 +144,7 @@ def plot_dataframe(dataframe: DataFrame, pair: str) -> None:
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# Install PYQT5==5.9 manually if you want to test this helper function
|
# Install PYQT5==5.9 manually if you want to test this helper function
|
||||||
while True:
|
while True:
|
||||||
|
exchange.EXCHANGE = Bittrex({'key': '', 'secret': ''})
|
||||||
test_pair = 'BTC_ETH'
|
test_pair = 'BTC_ETH'
|
||||||
# for pair in ['BTC_ANT', 'BTC_ETH', 'BTC_GNT', 'BTC_ETC']:
|
# for pair in ['BTC_ANT', 'BTC_ETH', 'BTC_GNT', 'BTC_ETC']:
|
||||||
# get_buy_signal(pair)
|
# get_buy_signal(pair)
|
||||||
|
@ -26,10 +26,6 @@ class Bittrex(Exchange):
|
|||||||
# Sleep time to avoid rate limits, used in the main loop
|
# Sleep time to avoid rate limits, used in the main loop
|
||||||
SLEEP_TIME: float = 25
|
SLEEP_TIME: float = 25
|
||||||
|
|
||||||
@property
|
|
||||||
def name(self) -> str:
|
|
||||||
return self.__class__.__name__
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def sleep_time(self) -> float:
|
def sleep_time(self) -> float:
|
||||||
return self.SLEEP_TIME
|
return self.SLEEP_TIME
|
||||||
@ -40,13 +36,6 @@ class Bittrex(Exchange):
|
|||||||
_EXCHANGE_CONF.update(config)
|
_EXCHANGE_CONF.update(config)
|
||||||
_API = _Bittrex(api_key=_EXCHANGE_CONF['key'], api_secret=_EXCHANGE_CONF['secret'])
|
_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:
|
def buy(self, pair: str, rate: float, amount: float) -> str:
|
||||||
data = _API.buy_limit(pair.replace('_', '-'), amount, rate)
|
data = _API.buy_limit(pair.replace('_', '-'), amount, rate)
|
||||||
if not data['success']:
|
if not data['success']:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-e git+https://github.com/ericsomdahl/python-bittrex.git@d7033d0#egg=python-bittrex
|
-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
|
python-telegram-bot==8.0
|
||||||
arrow==0.10.0
|
arrow==0.10.0
|
||||||
requests==2.18.4
|
requests==2.18.4
|
||||||
@ -11,10 +11,10 @@ scipy==0.19.1
|
|||||||
jsonschema==2.6.0
|
jsonschema==2.6.0
|
||||||
numpy==1.13.3
|
numpy==1.13.3
|
||||||
TA-Lib==0.4.10
|
TA-Lib==0.4.10
|
||||||
pytest==3.2.2
|
pytest==3.2.3
|
||||||
pytest-mock==1.6.3
|
pytest-mock==1.6.3
|
||||||
pytest-cov==2.5.1
|
pytest-cov==2.5.1
|
||||||
|
|
||||||
# Required for plotting data
|
# Required for plotting data
|
||||||
#matplotlib==2.0.2
|
#matplotlib==2.1.0
|
||||||
#PYQT5==5.9
|
#PYQT5==5.9
|
Loading…
Reference in New Issue
Block a user