Exemple #1
0
 async def tradable_pairs(self) -> set:
     result = await self.get('http://data.gate.io/api2/1/pairs')
     return set(
         Pair(
             pair.split('_')[0],
             pair.split('_')[1],
         ) for pair in result)
Exemple #2
0
async def get_pairs(exchange_name):
    async with pool.acquire() as conn:
        rows = await conn.fetch(
            '''SELECT base, quote
               FROM pair
               WHERE exchange_name = $1''', exchange_name)
        return {Pair(row['base'], row['quote']) for row in rows}
Exemple #3
0
 async def tradable_pairs(self) -> set:
     result = await self.get(
         'https://poloniex.com/public?command=returnTicker')
     return set(
         Pair(
             self._substitute(pair.split('_')[0]),
             self._substitute(pair.split('_')[1]),
         ) for pair in result)
Exemple #4
0
 async def tradable_pairs(self) -> set:
     response = await self.get('https://api.kraken.com/0/public/AssetPairs')
     result = response['result']
     return set(
         Pair(
             self._substitute(pair_info['base']),
             self._substitute(pair_info['quote']),
         ) for pair, pair_info in result.items())
Exemple #5
0
 async def tradable_pairs(self) -> set:
     response = await self.get(
         'https://api.kucoin.com/v1/market/open/symbols')
     result = response['data']
     return set(Pair(
         i['coinType'],
         i['coinTypePair'],
     ) for i in result)
Exemple #6
0
 async def tradable_pairs(self) -> set:
     response = await self.get(
         'https://www.cryptopia.co.nz/api/GetTradePairs')
     result = response['Data']
     return set(Pair(
         i['Symbol'],
         i['BaseSymbol'],
     ) for i in result)
Exemple #7
0
 async def tradable_pairs(self) -> set:
     result = await self.get(
         'https://poloniex.com/public?command=returnTicker')
     return set(
         Pair(
             pair.split('_')[1],  # reversed order
             pair.split('_')[0],
         ) for pair in result)
Exemple #8
0
 async def tradable_pairs(self) -> set:
     result = await self.get(
         'https://www.bitstamp.net/api/v2/trading-pairs-info/')
     return set(
         Pair(
             i['name'].split('/')[0],
             i['name'].split('/')[1],
         ) for i in result)
Exemple #9
0
 async def tradable_pairs(self) -> set:
     response = await self.get(
         'https://www.binance.com/exchange/public/product')
     result = response['data']
     return set(Pair(
         i['baseAsset'],
         i['quoteAsset'],
     ) for i in result)
Exemple #10
0
 async def tradable_pairs(self) -> set:
     response = await self.get('https://api.liqui.io/api/3/info')
     result = response['pairs']
     return set(
         Pair(
             pair.split('_')[0],
             pair.split('_')[1],
         ) for pair in result)
Exemple #11
0
 async def tradable_pairs(self) -> set:
     response = await self.get(
         'https://api.radarrelay.com/v1/info/tokens',
         headers={'Origin': 'https://app.radarrelay.com'})
     return set(Pair(
         pair['symbol'],
         'WETH',
     ) for pair in response)
Exemple #12
0
 async def tradable_pairs(self) -> set:
     response = await self.get(
         'https://bittrex.com/api/v1.1/public/getmarkets')
     result = response['result']
     return set(
         Pair(
             self._substitute(i['BaseCurrency']),
             self._substitute(i['MarketCurrency']),
         ) for i in result)
Exemple #13
0
 async def tradable_pairs(self) -> set:
     result = await self.get('https://api.bitfinex.com/v1/symbols')
     return set(Pair(i[:3].upper(), i[3:].upper()) for i in result)