SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
3 additions and
4 deletions
-
electrum/exchange_rate.py
|
|
@ -246,10 +246,9 @@ class BTCParalelo(ExchangeBase): |
|
|
|
class Coinbase(ExchangeBase): |
|
|
|
|
|
|
|
async def get_rates(self, ccy): |
|
|
|
json = await self.get_json('coinbase.com', |
|
|
|
'/api/v1/currencies/exchange_rates') |
|
|
|
return dict([(r[7:].upper(), Decimal(json[r])) |
|
|
|
for r in json if r.startswith('btc_to_')]) |
|
|
|
json = await self.get_json('api.coinbase.com', |
|
|
|
'/v2/exchange-rates?currency=BTC') |
|
|
|
return {ccy: Decimal(rate) for (ccy, rate) in json["data"]["rates"].items()} |
|
|
|
|
|
|
|
|
|
|
|
class CoinDesk(ExchangeBase): |
|
|
|