Browse Source

Merge pull request #5211 from FrancisPouliot/master

Add Bylls BTC/CAD rates
regtest_lnd
ghost43 6 years ago
committed by GitHub
parent
commit
5b6357d472
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      electrum/currencies.json
  2. 7
      electrum/exchange_rate.py

3
electrum/currencies.json

@ -386,6 +386,9 @@
"TWD",
"USD"
],
"Bylls": [
"CAD"
],
"CoinCap": [
"USD"
],

7
electrum/exchange_rate.py

@ -238,6 +238,13 @@ class BlockchainInfo(ExchangeBase):
return dict([(r, Decimal(json[r]['15m'])) for r in json])
class Bylls(ExchangeBase):
async def get_rates(self, ccy):
json = await self.get_json('bylls.com', '/api/price?from_currency=BTC&to_currency=CAD')
return {'CAD': Decimal(json['public_price']['to_price'])}
class Coinbase(ExchangeBase):
async def get_rates(self, ccy):

Loading…
Cancel
Save