more price sources

This commit is contained in:
Gustavo 2020-07-17 15:27:36 -03:00
parent 52f8aafb60
commit a073ea6050
2 changed files with 21 additions and 1 deletions

View file

@ -891,5 +891,11 @@
"Zaif": [
"JPY"
],
"itBit": []
"itBit": [],
"Bitragem": [
"BRL"
],
"Biscoint": [
"BRL"
]
}

View file

@ -389,6 +389,20 @@ class Zaif(ExchangeBase):
return {'JPY': Decimal(json['last_price'])}
class Bitragem(ExchangeBase):
async def get_rates(self,ccy):
json = await self.get_json('api.bitragem.com', '/v1/index?asset=BTC&market=BRL')
return {'BRL': Decimal(json['response']['index'])}
class Biscoint(ExchangeBase):
async def get_rates(self,ccy):
json = await self.get_json('api.biscoint.io', '/v1/ticker?base=BTC&quote=BRL')
return {'BRL': Decimal(json['data']['last']['last'])}
def dictinvert(d):
inv = {}
for k, vlist in d.items():