electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit c6780cce8473c6f5b05cbea8fd6f8b6cc729d229
parent 9ba75b80e26b2a58ae5cf6783babb8639c74d863
Author: ThomasV <thomasv@electrum.org>
Date:   Tue, 24 Nov 2015 10:35:25 +0100

add Bitso exchange rate

Diffstat:
Mplugins/exchange_rate/exchange_rate.py | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/plugins/exchange_rate/exchange_rate.py b/plugins/exchange_rate/exchange_rate.py @@ -22,7 +22,7 @@ CCY_PRECISIONS = {'BHD': 3, 'BIF': 0, 'BYR': 0, 'CLF': 4, 'CLP': 0, 'LYD': 3, 'MGA': 1, 'MRO': 1, 'OMR': 3, 'PYG': 0, 'RWF': 0, 'TND': 3, 'UGX': 0, 'UYI': 0, 'VND': 0, 'VUV': 0, 'XAF': 0, 'XAG': 2, 'XAU': 4, 'XOF': 0, - 'XPF': 0} + 'XPF': 0, 'MXN': 2} class ExchangeBase(PrintError): @@ -131,6 +131,14 @@ class BTCParalelo(ExchangeBase): def protocol(self): return "http" +class Bitso(ExchangeBase): + def get_rates(self, ccy): + json = self.get_json('api.bitso.com', '/v2/ticker') + return {'MXN': Decimal(json['last'])} + + def protocol(self): + return "http" + class Bitcurex(ExchangeBase): def get_rates(self, ccy): json = self.get_json('pln.bitcurex.com', '/data/ticker.json')