From a9c13d66418accc0fa3c21762272c478fa651dee Mon Sep 17 00:00:00 2001 From: Francis Pouliot Date: Thu, 17 Jan 2019 00:51:15 +0100 Subject: [PATCH] exchange_rate: add Bylls BTC/CAD rates --- electrum/currencies.json | 3 +++ electrum/exchange_rate.py | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/electrum/currencies.json b/electrum/currencies.json index ec9240015..657072bef 100644 --- 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 index 228d020ed..cf7840ec4 100644 --- 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):