electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit d2b96ad64b4700e33b0e39c1b8cd4fc60da5b395
parent 40fbf3a929abc040a4db675a69ae18427a647a4d
Author: ThomasV <thomasv@electrum.org>
Date:   Mon,  7 Dec 2020 10:11:15 +0100

Merge pull request #6821 from aldrinpscastro/master

Added new brazillian exchange to exchange rates plugin: Walltime.
Diffstat:
Melectrum/currencies.json | 3+++
Melectrum/exchange_rate.py | 8++++++++
2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/electrum/currencies.json b/electrum/currencies.json @@ -897,5 +897,8 @@ ], "Biscoint": [ "BRL" + ], + "Walltime": [ + "BRL" ] } diff --git a/electrum/exchange_rate.py b/electrum/exchange_rate.py @@ -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():