commit 5b6357d47285514827615ffcc7da4356ef0eca15
parent bdb6d65cf7322a56e0f6ffb388995f5ad33f9932
Author: ghost43 <somber.night@protonmail.com>
Date: Wed, 27 Mar 2019 19:03:49 +0100
Merge pull request #5211 from FrancisPouliot/master
Add Bylls BTC/CAD rates
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/electrum/currencies.json b/electrum/currencies.json
@@ -386,6 +386,9 @@
"TWD",
"USD"
],
+ "Bylls": [
+ "CAD"
+ ],
"CoinCap": [
"USD"
],
diff --git a/electrum/exchange_rate.py b/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):