add Bitso exchange rate
This commit is contained in:
parent
9ba75b80e2
commit
c6780cce84
|
@ -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,
|
'LYD': 3, 'MGA': 1, 'MRO': 1, 'OMR': 3, 'PYG': 0,
|
||||||
'RWF': 0, 'TND': 3, 'UGX': 0, 'UYI': 0, 'VND': 0,
|
'RWF': 0, 'TND': 3, 'UGX': 0, 'UYI': 0, 'VND': 0,
|
||||||
'VUV': 0, 'XAF': 0, 'XAG': 2, 'XAU': 4, 'XOF': 0,
|
'VUV': 0, 'XAF': 0, 'XAG': 2, 'XAU': 4, 'XOF': 0,
|
||||||
'XPF': 0}
|
'XPF': 0, 'MXN': 2}
|
||||||
|
|
||||||
class ExchangeBase(PrintError):
|
class ExchangeBase(PrintError):
|
||||||
|
|
||||||
|
@ -131,6 +131,14 @@ class BTCParalelo(ExchangeBase):
|
||||||
def protocol(self):
|
def protocol(self):
|
||||||
return "http"
|
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):
|
class Bitcurex(ExchangeBase):
|
||||||
def get_rates(self, ccy):
|
def get_rates(self, ccy):
|
||||||
json = self.get_json('pln.bitcurex.com', '/data/ticker.json')
|
json = self.get_json('pln.bitcurex.com', '/data/ticker.json')
|
||||||
|
|
Loading…
Reference in New Issue