tMerge pull request #1631 from pdroalves/master - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 7c7722439bfe29a9efeb74c6c57474d7e6cdfc1a DIR parent 44ee221c78f3cc455b6142b3d50c8fe09fb7ec71 HTML Author: ThomasV <thomasv@electrum.org> Date: Sat, 30 Jan 2016 16:27:06 +0100 Merge pull request #1631 from pdroalves/master Added new exchangers to Exchange rates plugin Diffstat: M plugins/exchange_rate/exchange_rat… | 17 +++++++++++++++++ 1 file changed, 17 insertions(+), 0 deletions(-) --- DIR diff --git a/plugins/exchange_rate/exchange_rate.py b/plugins/exchange_rate/exchange_rate.py t@@ -259,6 +259,23 @@ class Winkdex(ExchangeBase): return dict([(h['timestamp'][:10], h['price'] / 100.0) for h in history]) +class MercadoBitcoin(ExchangeBase): + def get_rates(self,ccy): + json = self.get_json('mercadobitcoin.net', + "/api/ticker/ticker_bitcoin") + return {'BRL': Decimal(json['ticker']['last'])} + + def history_ccys(self): + return ['BRL'] + +class Bitcointoyou(ExchangeBase): + def get_rates(self,ccy): + json = self.get_json('bitcointoyou.com', + "/API/ticker.aspx") + return {'BRL': Decimal(json['ticker']['last'])} + + def history_ccys(self): + return ['BRL'] def dictinvert(d):