@@ -246,10 +246,9 @@ class BTCParalelo(ExchangeBase):
|
|||||||
class Coinbase(ExchangeBase):
|
class Coinbase(ExchangeBase):
|
||||||
|
|
||||||
async def get_rates(self, ccy):
|
async def get_rates(self, ccy):
|
||||||
json = await self.get_json('coinbase.com',
|
json = await self.get_json('api.coinbase.com',
|
||||||
'/api/v1/currencies/exchange_rates')
|
'/v2/exchange-rates?currency=BTC')
|
||||||
return dict([(r[7:].upper(), Decimal(json[r]))
|
return {ccy: Decimal(rate) for (ccy, rate) in json["data"]["rates"].items()}
|
||||||
for r in json if r.startswith('btc_to_')])
|
|
||||||
|
|
||||||
|
|
||||||
class CoinDesk(ExchangeBase):
|
class CoinDesk(ExchangeBase):
|
||||||
|
|||||||
Reference in New Issue
Block a user