Browse Source
Merge pull request #6405 from itxtoledo/feature/more-price-sources
Feature: more price sources for BRL and remove scam broker
bip39-recovery
ThomasV
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
21 additions and
10 deletions
-
electrum/currencies.json
-
electrum/exchange_rate.py
|
|
@ -882,14 +882,17 @@ |
|
|
|
"MercadoBitcoin": [ |
|
|
|
"BRL" |
|
|
|
], |
|
|
|
"NegocieCoins": [ |
|
|
|
"BRL" |
|
|
|
], |
|
|
|
"TheRockTrading": [ |
|
|
|
"EUR" |
|
|
|
], |
|
|
|
"Zaif": [ |
|
|
|
"JPY" |
|
|
|
], |
|
|
|
"itBit": [] |
|
|
|
"itBit": [], |
|
|
|
"Bitragem": [ |
|
|
|
"BRL" |
|
|
|
], |
|
|
|
"Biscoint": [ |
|
|
|
"BRL" |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
@ -352,12 +352,6 @@ class MercadoBitcoin(ExchangeBase): |
|
|
|
return {'BRL': Decimal(json['ticker_1h']['exchanges']['MBT']['last'])} |
|
|
|
|
|
|
|
|
|
|
|
class NegocieCoins(ExchangeBase): |
|
|
|
|
|
|
|
async def get_rates(self,ccy): |
|
|
|
json = await self.get_json('api.bitvalor.com', '/v1/ticker.json') |
|
|
|
return {'BRL': Decimal(json['ticker_1h']['exchanges']['NEG']['last'])} |
|
|
|
|
|
|
|
class TheRockTrading(ExchangeBase): |
|
|
|
|
|
|
|
async def get_rates(self, ccy): |
|
|
@ -389,6 +383,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"e=BRL') |
|
|
|
return {'BRL': Decimal(json['data']['last'])} |
|
|
|
|
|
|
|
|
|
|
|
def dictinvert(d): |
|
|
|
inv = {} |
|
|
|
for k, vlist in d.items(): |
|
|
|