blockbook/configs/coins
Vladyslav Burzakovskyy f6111af5da Add fiat rates functionality (#316)
* Add initial commit for fiat rates functionality

* templates.go: use bash from current user's environment

* bitcoinrpc.go: add FiatRates and FiatRatesParams to config

* blockbook.go: add initFiatRatesDownloader kickoff

* bitcoin.json: add coingecko API URL

* rockdb.go: add FindTicker and StoreTicker functions

* rocksdb_test.go: add a simple test for storing and getting FiatRate tickers

* rocksdb: add FindLastTicker and convertDate, make FindTicker return strings

* rocksdb: add ConvertDate function and CoinGeckoTicker struct, update tests

* blockbook.go, fiat: finalize the CoinGecko downloader

* coingecko.go: do not stop syncing when encountered an error

* rocksdb_test: fix the exported function name

* worker.go: make getBlockInfoFromBlockID a public function

* public.go: apiTickers kickoff

* rocksdb_test: fix the unittest comment

* coingecko.go: update comments

* blockbook.go, fiat: reword CoinGecko -> FiatRates, fix binary search upper bound, remove assignment of goroutine call result

* rename coingecko -> fiat_rates

* fiat_rates: export only the necessary methods

* blockbook.go: update log message

* bitcoinrpc.go: remove fiatRates settings

* use CurrencyRatesTicker structure everywhere, fix time format string, update tests, use UTC time

* add /api/v2/tickers tests, store rates as strings (json.Number)

* fiat_rates: add more tests, metrics and tickers-list endpoint, make the "currency" parameter mandatory

* public, worker: move FiatRates API logic to worker.go

* fiat_rates: add a future date test, fix comments, add more checks, store time as a pointer

* rocksdb_test: remove unneeded code

* fiat_rates: add a "ping" call to check server availability

* fiat_rates: do not return empty ticker, return nil instead if not found

add a test for non-existent ticker

* rocksdb_test: remove Sleep from tests

* worker.go: do not propagate all API errors to the client

* move InitTestFiatRates from rocksdb.go to public_test.go

* public.go: fix FiatRatesFindLastTicker result check

* fiat_rates: mock API server responses

* remove commented-out code

* fiat_rates: add comment explaining what periodSeconds attribute is used for

* websocket.go: implement fiatRates websocket endpoints & add tests

* fiatRates: add getFiatRatesTickersList websocket endpoint & test

* fiatRates: make websocket getFiatRatesByDate accept an array of dates, add more tests

* fiatRates: remove getFiatRatesForBlockID from websocket endpoints

* fiatRates: remove "if test", use custom startTime instead

Update tests and mock data

* fiatRates: finalize websocket functionality

add "date" parameter to TickerList

return data timestamps where needed

fix sync bugs (nil timestamp, duplicate save)

* fiatRates: add FiatRates configs for different coins

* worker.go: make GetBlockInfoFromBlockID private again

* fiatRates: wait & retry on errors, remove Ping function

* websocket.go: remove incorrect comment

* fiatRates: move coingecko-related code to a separate file, use interface

* fiatRates: if the new rates are the same as previous, try five more times, and only then store them

* coingecko: fix getting actual rates, add a timestamp parameter to get uncached responses

* vertcoin_testnet.json: remove fiat rates parameters

* fiat_rates: add timestamp to log message about skipping the repeating rates
2019-12-17 10:40:02 +01:00
..
bcash.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
bcash_testnet.json bch (+testnet): Bump backend 0.20.7 -> 0.20.8 2019-12-11 14:20:11 +01:00
bcashsv.json Bump bchsv backend 0.1.1 -> 0.2.1 2019-07-23 12:20:05 +02:00
bellcoin.json Sync coin parameters from trezor-firmware monorepo 2019-05-31 13:51:08 +02:00
bgold.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
bitcoin.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
bitcoin_testnet.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
cpuchain.json Bump CPUchain backend to 0.18.1 2019-10-17 20:17:28 +02:00
dash.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
dash_testnet.json dash (+testnet): Bump backend 0.14.0.4 -> 0.14.0.5 2019-12-10 22:52:16 +01:00
decred.json add decred.conf (#292) 2019-09-20 11:35:26 +02:00
decred_testnet.json decred: use correct coin type (#240) 2019-07-22 17:32:34 +02:00
deeponion.json Add DeepOnion (#298) 2019-11-18 17:51:45 +01:00
digibyte.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
divi.json Add support for DIVI (#228) 2019-08-21 19:07:35 +02:00
dogecoin.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
ethereum-classic.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
ethereum.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
ethereum_testnet_ropsten.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
flo.json add flo 2019-02-08 08:50:59 +01:00
flo_testnet.json add flo 2019-02-08 08:50:59 +01:00
fujicoin.json mod binary_url 2019-05-21 10:26:10 +02:00
gamecredits.json Update xpub segwit native magic from trezor-common 2019-03-28 14:44:40 +01:00
groestlcoin.json Fix groestlcoin config 2019-03-01 16:29:34 +01:00
groestlcoin_testnet.json Fix groestlcoin config 2019-03-01 16:29:34 +01:00
koto.json Bump Koto backend to 2.1.0 2019-11-06 17:07:37 +01:00
koto_testnet.json Bump Koto backend to 2.1.0 2019-11-06 17:07:37 +01:00
liquid.json Update references to forked btcd, btcutil and bchutil libraries 2019-01-04 14:05:51 +01:00
litecoin.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
litecoin_testnet.json bump litecoin backend (+testnet) 0.16.3 -> 0.17.1 2019-05-31 08:47:48 +02:00
monacoin.json Change backend config file(monacoin) 2019-08-21 19:06:19 +02:00
monacoin_testnet.json Add monacoin testnet params 2019-08-26 11:32:32 +02:00
monetaryunit.json Fix monetaryunit checksum (#189) #188 2019-05-29 10:45:59 +02:00
myriad.json Update xpub segwit native magic from trezor-common 2019-03-28 14:44:40 +01:00
namecoin.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
nuls.json Some updates to NULS (#183) 2019-05-28 01:02:38 +02:00
pivx.json Sync with trezor common and fix formatting 2019-03-01 14:55:24 +01:00
pivx_testnet.json Sync with trezor common and fix formatting 2019-03-01 14:55:24 +01:00
polis.json Bump Polis v1.4.18 2019-09-04 12:57:13 +02:00
qtum.json bump Qtum to 0.18.1 (#294) 2019-09-20 11:36:05 +02:00
qtum_testnet.json bump Qtum to 0.18.1 (#294) 2019-09-20 11:36:05 +02:00
ravencoin.json Bump Ravencoin backend to 2.5.1.0 2019-08-29 23:41:22 +02:00
ritocoin.json Bump Ritocoin backend to 2.4.1.0 2019-10-10 15:30:19 +02:00
unobtanium.json Add Unobtanium (#276) 2019-09-15 22:53:51 +02:00
vertcoin.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
vertcoin_testnet.json Bump Vertcoin backend version to 0.14.0 due algo fork 2019-01-07 11:15:30 +01:00
viacoin.json Viacoin add support 2019-04-18 10:25:48 +02:00
vipstarcoin.json Sync coin parameters from trezor-firmware monorepo 2019-05-31 13:51:08 +02:00
zcash.json Add fiat rates functionality (#316) 2019-12-17 10:40:02 +01:00
zcash_testnet.json Fix version in Zcash and Zcash-testnet configs 2019-11-13 13:43:06 +01:00
zcoin.json Bump Zcoin to 0.13.8.8 2019-12-03 11:40:59 +01:00
zelcash.json zelcash 3.3.0 2019-07-12 15:59:26 +02:00