Merge pull request #64 from xsmile/patch-1

Bittrex provider
This commit is contained in:
Michael Egger 2017-10-12 09:37:15 +02:00 committed by GitHub
commit 4559ddd74f
1 changed files with 0 additions and 11 deletions

View File

@ -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']: