bisq-network / bisq-pricenode

GNU General Public License v3.0
6 stars 12 forks source link

Fix: Include missing stablecoin quotes. #24

Closed ghost closed 1 year ago

ghost commented 1 year ago

This will include stablecoins quotes from Binance, Kraken, and Bitstamp that were previously ignored. The quoted price needs to be inverted to satisfy the Bisq client's demand that every altcoin is denominated in BTC.

Aug-26 20:23:28.304 [Timer-7] INFO  b.p.s.p.Bitstamp: USDC isInverted, price translated from 26023 to 0.00003843 for Bisq client. 
Aug-26 20:23:28.304 [Timer-7] INFO  b.p.s.p.Bitstamp: refresh took 465 ms. 
Aug-26 20:23:28.304 [Timer-7] INFO  b.p.s.p.Bitstamp: BTC/USDC: 3.843E-5 

Aug-26 20:24:32.615 [Timer-9] INFO  b.p.s.p.Binance: TUSD isInverted, price translated from 26052.60000000 to 0.00003838 for Bisq client. 
Aug-26 20:24:32.616 [Timer-9] INFO  b.p.s.p.Binance: USDC isInverted, price translated from 26034.11000000 to 0.00003841 for Bisq client. 
Aug-26 20:24:32.616 [Timer-9] INFO  b.p.s.p.Binance: DAI isInverted, price translated from 26031.25000000 to 0.00003842 for Bisq client. 
Aug-26 20:24:32.617 [Timer-9] INFO  b.p.s.p.Binance: refresh took 4778 ms. 
Aug-26 20:24:32.619 [Timer-9] INFO  b.p.s.p.Binance: BTC/TUSD: 3.838E-5 
Aug-26 20:24:32.619 [Timer-9] INFO  b.p.s.p.Binance: BTC/USDC: 3.841E-5 
Aug-26 20:24:32.620 [Timer-9] INFO  b.p.s.p.Binance: BTC/DAI: 3.842E-5 

Aug-26 20:25:28.447 [Timer-18] INFO  b.p.s.p.Kraken: DAI isInverted, price translated from 26020.50000 to 0.00003843 for Bisq client. 
Aug-26 20:25:28.448 [Timer-18] INFO  b.p.s.p.Kraken: USDC isInverted, price translated from 26029.02000 to 0.00003842 for Bisq client. 
Aug-26 20:25:28.448 [Timer-18] INFO  b.p.s.p.Kraken: refresh took 612 ms. 
Aug-26 20:25:28.450 [Timer-18] INFO  b.p.s.p.Kraken: BTC/DAI: 3.843E-5 
Aug-26 20:25:28.450 [Timer-18] INFO  b.p.s.p.Kraken: BTC/USDC: 3.842E-5 

On other exchanges (Bitfinex), DAI is quoted as an altcoin, so it does not get translated. This was already supplied to Bisq previously, and will continue to do so.

Aug-26 20:25:28.325 [Timer-13] INFO  b.p.s.p.Bitfinex: BTC/DAI: 3.694E-5 

If USDT-E in Bisq had the ticker USDT, then its rate would be obtained/supplied by PriceNode the same as the other stablecoins.


ping: @pjakma

pjakma commented 1 year ago

Running this now, and I'm seeing pricing info for USDC now (DAI was already there). Which means Bisq now lets you make offers with floating percentage prices for USDC, yay! Thanks!

Havn't checked TUSD. Would be interested in having USDT work. I guess it be difficult to change USDT-E ticker in Bisq - but you could remap USDT (exchange) side to USDT-E (Bisq side) in pricenode perhaps?

ghost commented 1 year ago

remap USDT (exchange) side to USDT-E (Bisq side) in pricenode perhaps

Done! https://github.com/bisq-network/bisq-pricenode/pull/24/commits/5d3e7d77baad61803991baa5a0865e67a5ea20bf

pjakma commented 1 year ago

Awesome. :) Thanks @jmacxx. Running the USDT-remap diff too now, and able to create floating-% offers for USDT for the first time!