mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
more price sources
This commit is contained in:
parent
52f8aafb60
commit
a073ea6050
2 changed files with 21 additions and 1 deletions
|
@ -891,5 +891,11 @@
|
||||||
"Zaif": [
|
"Zaif": [
|
||||||
"JPY"
|
"JPY"
|
||||||
],
|
],
|
||||||
"itBit": []
|
"itBit": [],
|
||||||
|
"Bitragem": [
|
||||||
|
"BRL"
|
||||||
|
],
|
||||||
|
"Biscoint": [
|
||||||
|
"BRL"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -389,6 +389,20 @@ class Zaif(ExchangeBase):
|
||||||
return {'JPY': Decimal(json['last_price'])}
|
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"e=BRL')
|
||||||
|
return {'BRL': Decimal(json['data']['last']['last'])}
|
||||||
|
|
||||||
|
|
||||||
def dictinvert(d):
|
def dictinvert(d):
|
||||||
inv = {}
|
inv = {}
|
||||||
for k, vlist in d.items():
|
for k, vlist in d.items():
|
||||||
|
|
Loading…
Add table
Reference in a new issue