Commit Graph

92 Commits

Author SHA1 Message Date
jmacxx
e901e398ea
add mempool fees to the getAllMarketPrices endpoint 2021-06-07 18:14:50 -05:00
Stephan Oeste
2139077e0c
Remove Bitpay as a pricenode data provider 2021-05-27 12:38:16 +02:00
jmacxx
f462a72899
Differentiate PriceNode minFee/txFee limits (2 and 10) 2021-05-11 21:50:10 -05:00
wiz
938e9b29ab
Reduce mempool fee suggestion from high to medium priority
This reverts commit 087e160f6b.
2021-04-28 04:15:24 +09:00
wiz
087e160f6b
Pricenode: Increase mempool fee suggestion from medium to high priority 2021-04-21 20:13:41 +09:00
jmacxx
fd7ce51bf9
Field id strings for FeeService extracted to Config.java 2021-02-25 11:51:40 -06:00
jmacxx
c33ac1b983
Obtain minimumFee from mempool api in place of hardcoded value 2021-02-24 22:47:06 -06:00
jmacxx
192a905231
codacy 2020-12-03 14:01:54 -06:00
jmacxx
8bd03d2689
Start pricenode providers asynchronously
Fixes #4441
2020-12-03 13:32:01 -06:00
wiz
3007dcce9b
Remove test cases for HitBTC pricenode data provider class 2020-11-09 09:31:07 +01:00
wiz
c0108f3089
Remove HitBTC as a pricenode data provider
Recently, some Monero traders were complaining the XMR/BTC price on the
Bisq Price Index was off from most exchanges. Indeed, it seems HitBTC is
trading at a -10% divergence for some reason, I guess they have low
liquidity or some other reason, but after taking a look we are currently
using HitBTC for the following assets:

* AEON - only 2 trades ever, last traded March 2019
* EMC - never traded
* GRIN - looks like only fake trades, last traded Jan 2019
* PART - only 7 trades ever, last traded August 2020
* XRC - last traded December 2019
* XMR - obviously very important for Bisq

So I feel it's worth it to drop HitBTC as a data provider from Bisq to
make the Monero traders happy and make the Monero price more accurate.
2020-11-09 09:30:55 +01:00
Oscar Guindzberg
c4131c7398
Rename "tx size" to "tx vsize" 2020-11-05 19:28:45 -03:00
wiz
894cdf3536
Reduce mempool fee estimation back to "medium" priority
Now that we've recently optimized the "medium" fee estimation algorithm
in mempool/mempool@15bb5a96, we can move Bisq back to "medium", since
always using "high" will be a bit wasteful on the weekends when the
mempool is empty.
2020-10-06 01:30:34 +09:00
wiz
8e3b727d07
Increase our mempool fee estimation from "medium" to "high" priority
Bisq currently uses the mempool.space API for fee estimation, selecting
the "medium" priority fee, which generally works very well. However, if
your timing is bad, sometimes the mempool can quickly fill up and your
TX can get stuck for several hours or even days, which degrades the UX
of Bisq.

This PR changes the Pricenode code to always use "high" priority fees,
which would at the time of writing use 99 sat/vB instead of 85 sat/vB,
and hopefully prevent the above-mentioned issue from occuring. Of
course if the mempool is empty the minimum fees would still be used, as
this only changes the "priority" from medium to high.

Fee estimates: https://mempool.space/
API endpoint: https://mempool.space/api/v1/fees/recommended
2020-10-02 05:15:40 +09:00
Devin Bileck
51f318d47f
Add mempool.bisq.services explorer and mempool fee estimation provider 2020-08-26 00:01:22 -07:00
wiz
0c4b6a50f4
Modify pricenode install script to use master instead of release tag 2020-08-23 09:14:36 +09:00
wiz
bff4865ca7
Pricenode tweak: completely remove Coinmate and cex.io as data providers
Based on user feedback, these exchanges are too illiquid and do not
accurately reflect the true price of the market. After research, I found
the user's feedback to be correct and this PR removes both exchanges.
2020-08-21 17:53:14 +09:00
wiz
1d784211c2
Add mempool.ninja to pricenodes as 3rd mempool fee estimation backend 2020-08-17 23:36:09 +09:00
sqrrm
06e533bb81
Merge pull request #4315 from cd2357/xchange-integration-introduce-aggregate-rates
PriceNode: Add support for multiple ExchangeRateProviders
2020-08-17 14:44:16 +02:00
cd2357
d972a7571a
Improve exception handling to match Codacy rules
Rewrite a few generic parts of the code to be more specific in what they
 handle, or how they handle the resulting data structure.
2020-08-08 17:12:39 +02:00
cd2357
0c2703848c
Apply Codacy style changes
Apply various changes in coding style, required by the Codacy check.
2020-08-08 16:05:15 +02:00
cd2357
9fb5c0bb53
Remove unused imports
Removed unused imports from pricenode classes.
2020-08-08 15:24:08 +02:00
cd2357
11076e773d
Set quiet flag for java install command
Reduce verbosity of install command to only errors

Co-authored-by: wiz <j@wiz.biz>
2020-08-06 10:26:13 +02:00
cd2357
36dbb2e943
Upgrade Java to v11
Use Java 11 to run the pricenode service, since v11 includes by
default some root certificates needed when establishing SSH connections
to some of the new API endpoints.
2020-08-05 23:26:03 +02:00
cd2357
82bbb2dafa
Upgrade Tor to v3
Use tor v3 addresses during a new pricenode setup.
2020-08-05 23:20:14 +02:00
cd2357
4dc24e5606
Disable BitcoinAverage
Disable BitcoinAverage provider. Keep it registered as a provider to
ensure that the data structure returned by the pricenode to the Bisq
clients contain the hardcoded "btcAverageTs" key.
2020-08-05 23:17:18 +02:00
Christoph Atteneder
41f7350217
Merge pull request #4382 from cd2357/patch-1
Force non-interactive install of git lfs
2020-07-30 09:50:40 +02:00
cd2357
33550caab2
Remove unused maxBlocks param from pricenode
As the new fee estimation API does not require this parameter
anymore, remove it and all references to it.

See bisq-network/projects#27
2020-07-28 22:11:46 +02:00
cd2357
8d335441c3
Fix Bitpay and CoinGecko altcoin rates
Correctly interpret the alt conversion rate reported by the API. For
alts, Bisq needs the Alt/BTC rate, whereas the API returns the BTC/Alt
one. Calculate the inverse of the reported values before storing them as
 Bisq internal datastructures (ExchangeRates).
2020-07-28 21:10:25 +02:00
cd2357
efda45fa78
Integrate Hitbtc exchange API
Add Hitbtc ExchangeRateProvider and corresponding unit test.
2020-07-27 18:55:11 +02:00
cd2357
b362b4c8d2
Integrate Huobi exchange API
Add Huobi ExchangeRateProvider and corresponding unit test.
2020-07-27 18:53:13 +02:00
cd2357
5a194420ed
Integrate Coinpaprika API
Add Coinpaprika ExchangeRateProvider and corresponding unit test.
2020-07-27 16:17:38 +02:00
cd2357
399f65d404
Integrate CoinGecko API
Add CoinGecko ExchangeRateProvider and corresponding unit test.
2020-07-27 14:53:03 +02:00
cd2357
9be2a5bbb4
Integrate Bitpay exchange rate API
Add a Bitpay exchange rate provider and corresponding unit test.
2020-07-27 14:52:36 +02:00
cd2357
637378b58a
Integrate more exchanges using knowm xchange
Add more exchange providers supported by the knowm xchange library.

This extends support for a few new currencies.
2020-07-27 13:02:25 +02:00
cd2357
7fc5191798
Reuse sets of supported currencies
Reuse sets of supported currencies between pricenode classes and tests.
2020-07-20 18:14:38 +02:00
cd2357
329188db1d
Reduce number of exchange API calls when polling
Retrieve the exchange rates in bulk, when possible. This reduces
the number of calls the pricenode makes to the exchange API from N =
"number of exchange rates to retrieve" to N = 1.

The replaced approach, which made a separate call to the exchange API
for each exchange rate, was sometimes failing due to reaching API rate
limits.
2020-07-20 18:14:38 +02:00
cd2357
aceb7eef15
Renamed ExchangeRateProvider test class
Give a more accurate name to the abstract test class
which contains common methods used by all
ExchangeRateProvider tests, like BinanceTest or KrakenTest.

Mark this test class as abstract, to indicate that it
should not be run as a standalone test.
2020-07-20 18:14:37 +02:00
cd2357
75a0a47a1e
Mark new ExchangeRateProviders as package-private
Remove public modifier in their class definitions to
preserve their package-private scope.
2020-07-20 18:14:37 +02:00
cd2357
020547e19b
Remove Order annotation from ExchangeRateProviders
Remove Order annotation from rate providers, which was
used in the case that multiple providers would retrieve
rates for the same currency.

The ExchangeRateService now handles such scenarios, thus
eliminating the need for deciding provider precedence via
the Order annotation.
2020-07-20 18:14:37 +02:00
cd2357
5cffddc9ae
Rewrite else-if clause
Simplify if-else block to avoid redundant use of else-if
in combination with an empty check and a return statement.
2020-07-20 18:14:37 +02:00
cd2357
3e314a9d24
Rename exception variables to ex
Update the name of exception variables to ex for
consistency and better readability.
2020-07-20 18:14:37 +02:00
cd2357
141ead0b2f
Wrap comments at 90 characters
Update comments to reflect bisq-network/style#5 guideline
2020-07-20 18:14:37 +02:00
cd2357
671e80929a
Integrate initial set of ExchangeRateProviders
Add support for a few exchanges to demonstrate and test the pricenode
aggregate rates.

The chose exchanges were selected because they each provide a varied
list of fiat and altcoins, with a substantial overlap between them. This
 provides a robust initial set of datapoints and scenarios for aggregate
  rates.
2020-07-20 18:14:37 +02:00
cd2357
f650115580
ExchangeRateService: Support aggregate rates
Add support for aggregate rates in the ExchangeRateService. If multiple
ExchangeRateProviders contain rates for the same currency, then these
rates will be automatically aggregated (averaged) into one.

This allows the service to transparently scale to multiple providers for
 any specific currency.

The clients index the rates received from the pricenode by currency
code, which means they expect at most a single rate per currency. By
aggregating rates from multiple providers into one per currency, the
ExchangeRateService provides more accurate price data. At the same time,
the service API data structure remains intact, thus preserving backward
compatibility with all clients.
2020-07-20 18:14:37 +02:00
cd2357
f2085b4bf0
Simplify validation in ExchangeRateServiceTest
Update sanity check methods to allow for deeper and more comprehensive
validations of the input data. Accept full ExchangeRateProviders in the
method signatures, instead of just the provider prefix, to allow for
more complex sanity checks within those validation methods.
2020-07-20 18:14:37 +02:00
cd2357
a8cff75988
Force non-interactive install of git lfs
Update install command to not need user interaction
2020-07-12 17:02:12 +02:00
Devin Bileck
0bab863ee9
Fix command shown in README used to install collectd service
The install_collectd_debian.sh script reads user input to obtain the
onion address. However, when you pipe the output of curl into the shell
you're making the script text be standard input of the shell, which
takes it in as commands to run. After that, there's nothing left to
read. Even if it were to try, it wouldn't get anything from the terminal
input, because it's not connected to it. The pipe has replaced standard
input for the shell process.

Instead, create a pipe for bash to read the output of curl from and
provide it as the script file argument. In this case, the standard input
of the script is still connected to the terminal, and read will work.
2020-06-17 22:35:02 -07:00
Devin Bileck
83e194686d
Update install scripts for Git LFS 2020-06-17 22:35:01 -07:00
mrosseel
54cfc7b563
add commands to update the pricenode 2020-06-04 10:53:21 +02:00