Browse Source
Added new brazillian exchange to exchange rates plugin: Walltime.
patch-4
Aldrin P. S. Castro
4 years ago
No known key found for this signature in database
GPG Key ID: 3DE900235A68F55F
2 changed files with
11 additions and
0 deletions
-
electrum/currencies.json
-
electrum/exchange_rate.py
|
|
@ -897,5 +897,8 @@ |
|
|
|
], |
|
|
|
"Biscoint": [ |
|
|
|
"BRL" |
|
|
|
], |
|
|
|
"Walltime": [ |
|
|
|
"BRL" |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
@ -411,6 +411,14 @@ class Biscoint(ExchangeBase): |
|
|
|
return {'BRL': Decimal(json['data']['last'])} |
|
|
|
|
|
|
|
|
|
|
|
class Walltime(ExchangeBase): |
|
|
|
|
|
|
|
async def get_rates(self, ccy): |
|
|
|
json = await self.get_json('s3.amazonaws.com', |
|
|
|
'/data-production-walltime-info/production/dynamic/walltime-info.json') |
|
|
|
return {'BRL': Decimal(json['BRL_XBT']['last_inexact'])} |
|
|
|
|
|
|
|
|
|
|
|
def dictinvert(d): |
|
|
|
inv = {} |
|
|
|
for k, vlist in d.items(): |
|
|
|