Bittrex provider
remove redundant 'name' property and pair validation call
This commit is contained in:
		| @@ -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']: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user