Commit Graph

36 Commits

Author SHA1 Message Date
ThomasV f49e766b21 Merge pull request #6410 from cointradermonitor/cointradermonitor-new-brazilian-index
Brazilian Bitcoin index source included.
2020-07-29 18:01:22 +02:00
Cointrader Monitor c67eef6e40 Brazilian Bitcoin index source included.
Added Brazilian Bitcoin Index from Cointrader Monitor (https://cointradermonitor.com/api/pbb/v1/ticker) as a "BRL" Fiat source.
The index is calculated from the last price and volume from 30 brazilian exchanges. It is a well-known price index used by bitcoin brazilian users.
More information at https://cointradermonitor.com/
2020-07-19 01:52:31 +00:00
Gustavo 396eabc623 removed scam exchange 2020-07-17 16:23:15 -03:00
Gustavo edef0cd4b6 fix biscoint ticker path 2020-07-17 15:30:48 -03:00
Gustavo a073ea6050 more price sources 2020-07-17 15:27:36 -03:00
SomberNight 52f8aafb60 kivy: fix fx history rates defaults.
In kivy, if the user enabled fx rates but did not touch the fx history settings,
the GUI would show that history rates are enabled but in fact they would be disabled:
the GUI called fx.get_history_config(default=True) when displaying the checkbox,
but exchange_rate.py would not fetch history rates.
(it would only get fixed if the user touched the fx history checkbox)

Note: FxThread.run() calls fx.show_history(), which calls fx.get_history_config() without arguments.
2020-07-16 01:00:51 +02:00
SomberNight cf1f2ba4dc network: replace "server" strings with ServerAddr objects 2020-04-15 17:23:47 +02:00
ThomasV 9224404108 Move callback manager out of Network class 2020-04-14 18:29:51 +02:00
SomberNight 9e57a59615 network: handle main_taskgroup dying better. passthrough CancelledError
Previously if a task running in the main_taskgroup raised,
main_taskgroup might have never finished as fx.run (another task running
in main_taskgroup) could not be cancelled (it was swallowing the CancelledError).

Need to be careful with catching all Exceptions or BaseExceptions,
as that might result in a coroutine not being cancellable.
Note that from python 3.8 onwards, CancelledError will inherit from BaseException
instead of Exception, so catching all Exceptions is somewhat less horrible
but this will only really matter if we raise the min py version to 3.8...

Really, all "except BaseException" lines are suspect and at least should be
considered for replacement with "except Exception".

-----

regarding fx.run not being cancellable before, and relevant lines, see:

https://github.com/spesmilo/electrum/blob/6197cfbb3b00f21fb01fd8ef95a849eb63fc9253/electrum/network.py#L1171
https://github.com/kyuupichan/aiorpcX/blob/0decdffce20aec217e9b4506ea20a0919994cea0/aiorpcx/curio.py#L242
https://github.com/kyuupichan/aiorpcX/blob/0decdffce20aec217e9b4506ea20a0919994cea0/aiorpcx/curio.py#L199
https://github.com/kyuupichan/aiorpcX/blob/0decdffce20aec217e9b4506ea20a0919994cea0/aiorpcx/curio.py#L208
https://github.com/kyuupichan/aiorpcX/blob/0decdffce20aec217e9b4506ea20a0919994cea0/aiorpcx/curio.py#L218
https://github.com/kyuupichan/aiorpcX/blob/0decdffce20aec217e9b4506ea20a0919994cea0/aiorpcx/curio.py#L221
https://github.com/spesmilo/electrum/blob/6197cfbb3b00f21fb01fd8ef95a849eb63fc9253/electrum/daemon.py#L194
https://github.com/spesmilo/electrum/blob/6197cfbb3b00f21fb01fd8ef95a849eb63fc9253/electrum/daemon.py#L203
https://github.com/spesmilo/electrum/blob/6197cfbb3b00f21fb01fd8ef95a849eb63fc9253/electrum/exchange_rate.py#L507
https://github.com/spesmilo/electrum/blob/6197cfbb3b00f21fb01fd8ef95a849eb63fc9253/electrum/exchange_rate.py#L79
2019-08-30 19:46:25 +02:00
ldz1 d17489e971 Removed dead exchange. 2019-07-21 13:15:06 +02:00
SomberNight 40e2b1d6e7 exchange_rate: fix #5495 2019-07-14 14:34:02 +02:00
SomberNight 93d68a4361 exchange_rate: fix #5487 2019-07-04 19:55:03 +02:00
SomberNight 3385a94753 logging: basics 2019-05-02 15:19:03 +02:00
SomberNight 4374b809fa fix-up prev 2019-03-27 19:01:38 +01:00
Francis Pouliot a9c13d6641 exchange_rate: add Bylls BTC/CAD rates 2019-03-27 19:00:40 +01:00
SomberNight 6311aa24a8 follow-up prev 2019-03-22 18:52:57 +01:00
SomberNight c23e949848 exchange_rate: change default provider to CoinGecko
closes #5188
2019-03-22 16:55:57 +01:00
SomberNight 5cbf54d23a exchange_rate: minor clean-up
based on mhsmith/electrum@7ed3f032dd
2019-03-22 16:48:47 +01:00
SomberNight 95a122596e fx: add CoinGecko and CoinCap
somewhat based on
Electron-Cash/Electron-Cash@b3c76cd311
Electron-Cash/Electron-Cash@adf8f943a1
Electron-Cash/Electron-Cash@8879e41fa0
2019-03-22 16:35:02 +01:00
SomberNight 7b4bb19b34 exchange_rate: raise for http status so empty hist rate dicts don't get saved
and if they had already been saved, treat them as if nothing was saved

context: BitcoinAverage started restricting the historical API endpoints.
they now deny unauthenticated requests. :/
2019-03-10 07:41:49 +01:00
SomberNight d6c2a0af94 exchange_rate: small fixups. BitcoinAverage, BitStamp
- BitcoinAverage seems to have historical rates for all currencies it supports
(as in, if there is spot price, there is also history).
- BitStamp now uses v2 API, also has support for EUR.
- Bitcointoyou does not seem to actually offer histories
(and `request_history` was undefined anyway)
- regenerate currencies.json
2019-02-27 23:49:25 +01:00
SomberNight 4b3a285871 exchange_rate: some clean-up and fixes
- generation of currencies.json was broken
- removed some dead exchanges
2019-02-27 21:48:33 +01:00
SomberNight 5a1778b7fe start using util.resource_path 2019-02-04 20:27:03 +01:00
SomberNight c3deb16a7d exchange rate: fix coinbase
closes #4897
2018-12-05 12:26:03 +01:00
Janus 37b009a342 qt history view custom fiat input fixes
previously, when you submitted a fiat value with thousands separator,
it would be discarded.
2018-11-27 17:00:26 +01:00
SomberNight 81cc20039e more type annotations in core lib 2018-10-22 16:41:25 +02:00
SomberNight e3b372946a rm aiosafe decorator. instead: log_exceptions and ignore_exceptions 2018-10-12 18:36:48 +02:00
SomberNight 5e4a4ae16b minor clean-up (prints/types/imports) 2018-09-28 17:58:46 +02:00
SomberNight 2a958499b6 fx: disable checking mime type in get_json
looking at you, CoinDesk..
2018-09-15 00:30:43 +02:00
SomberNight 6ccd83397c fx: asyncio.Event is not thread-safe; also the 'timeout' field was removed 2018-09-14 23:01:28 +02:00
SomberNight fffec71fb3 kivy fx: make sure displayed fiat values get updated 2018-09-10 16:43:04 +02:00
SomberNight 4a88ca1a3a fix --offline option for fx and trustedcoin 2018-09-08 17:56:29 +02:00
Janus 52b877ac3d network: add singleton accessor classmethod, port trustedcoin to aiohttp 2018-09-07 11:35:16 +02:00
SomberNight dc51e82f54 fx: don't dump trace if getting rates fails 2018-09-06 18:25:23 +02:00
Janus 6e80ba7b4f asyncio: labels, crash_reporter, fx: migrate requests use to aiohttp 2018-09-06 16:18:45 +02:00
Janus 097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00