예제 #1
0
 def format_exchange_pair(exchange, mkt_coin, base_coin):
     if exchange == 'binance':
         return mkt_coin.upper() + base_coin.upper()
     elif exchange == 'bittrex':
         return base_coin.upper() + '-' + mkt_coin.upper()
     elif exchange == 'gemini':
         return mkt_coin.lower() + base_coin.lower()
     elif exchange == 'gdax':
         return mkt_coin.upper() + '-' + base_coin.upper()
     else:
         raise APIDoesNotExistError(exchange, 'format_exchange_pair')
예제 #2
0
 def format_exchange_interval(exchange, interval):
     if exchange == 'binance':
         return interval
     elif exchange == 'bittrex':
         return interval
     elif exchange == 'gemini':
         return int(interval[0]) * INTERVAL_RATES[interval[1]]
     elif exchange == 'gdax':
         return int(
             int(interval[0]) * INTERVAL_RATES[interval[1]] /
             INTERVAL_RATES['s'])
     elif exchange == 'cryptopia':
         return interval
     else:
         raise APIDoesNotExistError(exchange, 'format_exchange_interval')
예제 #3
0
 def format_exchange_start_and_end_times(self, exchange, timestamp,
                                         minutes):
     divisor = self.exchange_divisors[exchange]
     start = timestamp / divisor
     end = timestamp / divisor + (minutes * 60000 / divisor)
     if exchange == 'binance':
         return int(start), int(end)
     elif exchange == 'bittrex':
         return start, end
     elif exchange == 'gemini':
         return start, end
     elif exchange == 'gdax':
         return datetime.fromtimestamp(
             start).isoformat(), datetime.fromtimestamp(end).isoformat()
     elif exchange == 'cryptopia':
         return start, end
     else:
         raise APIDoesNotExistError(exchange,
                                    'format_exchange_start_and_end_times')
예제 #4
0
 def initiate_withdrawal(self, coin, dest_addr):
     raise APIDoesNotExistError('bittrex', 'initiate_withdrawal')
예제 #5
0
 def get_account_info(self):
     raise APIDoesNotExistError('bittrex', 'get_account_info')
예제 #6
0
 def get_historical_tickers(self,
                            start_time=None,
                            end_time=None,
                            interval='1m'):
     raise APIDoesNotExistError('bittrex', 'get_historical_tickers')
예제 #7
0
 def get_historical_rate(self, pair, timestamp=None, interval='1m'):
     raise APIDoesNotExistError('bittrex', 'get_historical_rate')
예제 #8
0
 def get_historical_trades(self, pair):
     raise APIDoesNotExistError('GateIOAPI', 'get_historical_trades')