Add JPY exchange rate (#4016)

This commit is contained in:
脇山P 2018-03-05 20:08:10 +09:00 committed by ghost43
parent 81666bf9ac
commit 122cb08dc6
2 changed files with 31 additions and 2 deletions

View file

@ -798,5 +798,14 @@
"RUB",
"USD"
],
"itBit": []
}
"itBit": [],
"Bitbank": [
"JPY"
],
"BitFlyer": [
"JPY"
],
"Zaif": [
"JPY"
]
}

View file

@ -160,6 +160,20 @@ class BitcoinVenezuela(ExchangeBase):
"/historical/index.php?coin=BTC")[ccy +'_BTC']
class Bitbank(ExchangeBase):
def get_rates(self, ccy):
json = self.get_json('public.bitbank.cc', '/btc_jpy/ticker')
return {'JPY': Decimal(json['data']['last'])}
class BitFlyer(ExchangeBase):
def get_rates(self, ccy):
json = self.get_json('bitflyer.jp', '/api/echo/price')
return {'JPY': Decimal(json['mid'])}
class Bitmarket(ExchangeBase):
def get_rates(self, ccy):
@ -350,6 +364,12 @@ class Winkdex(ExchangeBase):
for h in history])
class Zaif(ExchangeBase):
def get_rates(self, ccy):
json = self.get_json('api.zaif.jp', '/api/1/last_price/btc_jpy')
return {'JPY': Decimal(json['last_price'])}
def dictinvert(d):
inv = {}
for k, vlist in d.items():