bisq icon indicating copy to clipboard operation
bisq copied to clipboard

ERROR PRICE_OUT_OF_TOLERANCE

Open bitcointerra opened this issue 2 years ago • 34 comments

abr-26 [BisqDaemonMain] WARN b.core.offer.OpenOfferManager: Received AckMessage with error state for OfferAvailabilityResponse with offerId ORDER ID and errorMessage=An error occurred at task: ProcessOfferAvailabilityResponse Take offer attempt rejected because of: PRICE_OUT_OF_TOLERANCE

This error occurs when accepting my offer.

Version 1.8.4

bitcointerra avatar Apr 26 '22 19:04 bitcointerra

@bitcointerra What is the currency of the offer?

jmacxx avatar Apr 26 '22 21:04 jmacxx

Hi, XMR

bitcointerra avatar Apr 26 '22 23:04 bitcointerra

During times of high price volatility this can happen, that your peers price is more than 2% different to yours. Sometimes this issue can be caused by a pricenode that has gone stale, but all 5 of our pricenodes are displaying a consistent XMR price.

I was not able to find any XMR offers that give the PRICE_OUT_OF_TOLERANCE error at this moment.

If the problem still happening for you, restart Bisq and try again. Do you get this error from several offers? If it is with one particular offer, or user, consider posting the offerId here where it can be looked into.

jmacxx avatar Apr 27 '22 01:04 jmacxx

This error occurs when accepting my offer. I'm using bisq_daemon

bitcointerra avatar Apr 27 '22 19:04 bitcointerra

@bitcointerra Ok, so sounds like your node is rejecting the taker's price. Is yours a fixed price or variable (market price) offer?

Please check your log and let us know what you find, looking for similar messages to these:

Takers price does not match offer price. Price at take-offer time: Taker's trade price is too far away from our calculated price based on the market price.

Please report the values it tells you for takers price and makers price in the log at that point, and the offer id. Is the onion address of the taker always the same?

jmacxx avatar Apr 27 '22 20:04 jmacxx

Hi, Variable (market price) offer

log below

mai-05 [BisqDaemonMain] WARN b.c.o.OpenOfferManager: Received AckMessage with error state for OfferAvailabilityResponse with offerId and errorMessage=An error occurred at task: ProcessOfferAvailabilityResponse Take offer attempt rejected because of: PRICE_OUT_OF_TOLERANCE

Is the onion address of the taker always not the same! I tested it with another bisq client.

bitcointerra avatar May 05 '22 21:05 bitcointerra

Hi,

ID Offer ieveqhar-db1d612e-9918-4a33-9ee3-647f750fc653-184 All offers are having the same problem.

bitcointerra avatar May 05 '22 21:05 bitcointerra

I checked the offer just now and it looks ok: no error when starting to take the offer. If you want to post a smaller offer (about 0.01 BTC) I can try taking it to check the error.

jmacxx avatar May 06 '22 13:05 jmacxx

The error continues. Please test now.

bitcointerra avatar May 07 '22 00:05 bitcointerra

I did. When clicking "Take offer", it says everything is good to continue. I cannot go further due to the large amounts in the offers, see my previous comment.

jmacxx avatar May 07 '22 02:05 jmacxx

Sorry. I was testing the fixed price. Now see the error. Please test now. ID offer SbPymDJP-fa5f0400-7e90-4348-8c54-495990cfbca0-184 or ieveqhar-db1d612e-9918-4a33-9ee3-647f750fc653-184

bitcointerra avatar May 07 '22 18:05 bitcointerra

Yes, now when I send OfferAvailabilityRequest your node is replying with OfferAvailabilityResponse containing status PRICE_OUT_OF_TOLERANCE. There's no other information in that message, but in the log file of your bisq_daemon it should write an explanation of which prices were being used resulting in the tolerance being too far apart. It would be good to know what prices the daemon complains about. In the meantime I can try running a bisq_daemon locally to try and reproduce the error.

jmacxx avatar May 07 '22 19:05 jmacxx

Please look in bisq.log of the daemon for the makersPrice= and takersPrice=. e.g.

Price at take-offer time: id=5873138, currency=XMR, takersPrice=567161, makersPrice=567171, deviation=0.0017631366907022716%

When the prices are too far different you'll get a PRICE_OUT_OF_TOLERANCE error. Perhaps the pricenode you're connecting to has issues, but lets see what prices it is complaining about.

jmacxx avatar May 07 '22 19:05 jmacxx

bisq.log

bitcointerra avatar May 07 '22 20:05 bitcointerra

Take offer attempt rejected because of: PRICE_OUT_OF_TOLERANCE mai.-07 15:13:32.587 [BisqDaemonMain] INFO b.c.o.OpenOfferManager: Received OfferAvailabilityRequest from xk7q7muaqqqxahttp5r4y3e65x6ffr24ahcpk2pvpttxxyo375sbxxyd.onion:9999 with offerId SbPymDJP-fa5f0400-7e90-4348-8c54-495990cfbca0-184 and uid 60d50ce6-a410-4ccc-8050-9ed6e57a409c mai.-07 15:13:32.835 [BisqDaemonMain] INFO b.c.offer.Offer: Price at take-offer time: id=SbPymDJP, currency=XMR, takersPrice=588933, makersPrice=605099, deviation=2.6716289400577464% mai.-07 15:13:32.835 [BisqDaemonMain] WARN b.c.offer.Offer: Taker's trade price is too far away from our calculated price based on the market price. takersPrice=588933 makersPrice=605099

bitcointerra avatar May 07 '22 20:05 bitcointerra

Thanks. In that example the takers price is correct. It appears the price node you connect to is ok; however even using the same pricenode and attempting to take your offer produces the out of tolerance error.

One thing looks odd about your offers - they contain both a fixed price AND a market price. This does not happen with other offers and I wonder if that is the cause of the problem. Could you describe the process you use to edit the offer details, given that you're using bisq_daemon. I'd like to be able to reproduce the same issue and perhaps the method of editing offer details has something to do with it.

jmacxx avatar May 07 '22 21:05 jmacxx

Hi, thanks for support.

https://github.com/ripcurlx/bisq-api-examples/blob/main/cli/bisq_api.py I use this library. I didn't understand. Do we have 2 prices for the same offer? What am I doing wrong?

bitcointerra avatar May 07 '22 22:05 bitcointerra

One thing looks odd about your offers - they contain both a fixed price AND a market price. ... Could you describe the process you use to edit the offer details, given that you're using bisq_daemon.

This could be some problem with the API CLI's editoffer method. I am watching this problem but it will be hard to reproduce it on my side (I have no XMR or wallet).

This might be too much detail here, but about fixed price AND a market price: There is a value for both the (fixed) price field, and the market_price_margin_pct field on the API's offer object, but the use_market_based_price flag determines the price model (fixed or margin based). See https://bisq-network.github.io/slate/#offerinfo

I am also wondering if there is something different about the way the API and Desktop use the price feed. Here's the cleartext price feed: https://price.bisq.wiz.biz/getAllMarketPrices.

ghubstan avatar May 07 '22 22:05 ghubstan

https://github.com/ripcurlx/bisq-api-examples/blob/main/cli/bisq_api.py I use this library. I didn't understand. Do we have 2 prices for the same offer? What am I doing wrong?

You are probably not doing anything wrong.

But here is another possible problem source: the CLI console output parsing Python API example you are using is out of date, and there have been changes to the API that may (probably) broke the example you are using.

There is a new set of examples in bisq-network repo https://github.com/bisq-network/bisq-api-reference. Instead of parsing CLI console output text, the new Python examples use the protobuf objects, with all the offer object fields described in the API reference, i.e., https://bisq-network.github.io/slate/#offerinfo.

You can look at your client-side offer object in your debugger. That would be very useful in sorting out this problem.
See if you can run the getoffer example shown in the API reference: https://bisq-network.github.io/slate/?python#rpc-method-getoffer.

That example script lives here: https://github.com/bisq-network/bisq-api-reference/blob/main/python-examples/bisq/rpccalls/get_offer.py

Instructions for setting up the Python examples (building the API's gRPC stubs) are in https://github.com/bisq-network/bisq-api-reference/blob/main/python-examples/run-setup.sh.

I said all that because I did not think I could look at this in my debugger tonight, but I did. (I don't expect you to have to debug code when calling support... but it's double-plus-good if you can;-)

I looked at the offer from the API CLI and get_offer.py example @ 8-May, ~00:30 UTC.

Here is what I found: 1

2

If working correctly, this offer was either (a) created as a fixed-price offer, and/or (b) changed from a mkt-price-margin based offer by an edit.

The fixed-price on the offer @ 8-May ~ 00:30 UTC was 0.00586782 BTC. Then, @ ! 00:42 UTC is was different: 0.00586376 BTC. A fixed-price offer's price should not be changing. This is a bug I will look into tomorrow+.

ghubstan avatar May 07 '22 22:05 ghubstan

I updated the code. So far no errors. thanks @ghubstan

bitcointerra avatar May 08 '22 06:05 bitcointerra

Now see the error. Please test now again. ID offer SbPymDJP-fa5f0400-7e90-4348-8c54-495990cfbca0-184 or ieveqhar-db1d612e-9918-4a33-9ee3-647f750fc653-184

Captura de tela de 2022-05-07 15-37-05

Code now base

bitcointerra avatar May 08 '22 08:05 bitcointerra

bisq1.log

bitcointerra avatar May 08 '22 08:05 bitcointerra

mai.-08 04:14:24.823 [BisqDaemonMain] WARN b.c.offer.Offer: Taker's trade price is too far away from our calculated price based on the market price. takersPrice=593060 makersPrice=600580 mai.-08 04:14:24.823 [BisqDaemonMain] WARN b.c.o.OpenOfferManager: Trade price check failed because takers price is outside out tolerance. mai.-08 04:14:24.823 [BisqDaemonMain] INFO b.c.o.OpenOfferManager: Send OfferAvailabilityResponse with offerId ieveqhar-db1d612e-9918-4a33-9ee3-647f750fc653-184 and uid bbfee6da-7975-488d-a79d-3ea89fa11034 to peer ljazuqz24fjhhm47sa35laa6yyyp4e65feuywytdqyedowsc4vgwheid.onion:9999

bitcointerra avatar May 08 '22 08:05 bitcointerra

@bitcointerra do you have a matrix acct & client, where we could DM each other about this?

  1. Did you create offer SbPymDJP-fa5f0400-7e90-4348-8c54-495990cfbca0-184 with the API, using the https://github.com/ripcurlx/bisq-api-examples/blob/main/cli/bisq_api.py library?
  2. Did you edit this offer with the API, using the https://github.com/ripcurlx/bisq-api-examples/blob/main/cli/bisq_api.py library?

ghubstan avatar May 08 '22 14:05 ghubstan

@ghubstan I'm using the library you posted last. bisq-api-reference https://github.com/bisq-network/bisq-api-reference Update my vide for this library

bitcointerra avatar May 08 '22 14:05 bitcointerra

Thanks for updating to new python lib... But did you create and edit that offer with https://github.com/ripcurlx/bisq-api-examples/blob/main/cli/bisq_api.py?

ghubstan avatar May 08 '22 14:05 ghubstan

@ghubstan I didn't create by this ripcurlx library. But I edited a few times.

bitcointerra avatar May 08 '22 14:05 bitcointerra

FYI: Right now, SbPymDJP-fa5f0400-7e90-4348-8c54-495990cfbca0-184 is a margin price based offer, and it's price should move with XMR market price. And it is, when I call CLI's getoffer. Is that how you edited this offer the last time? Setting a margin % (not a fixed-price)?

Can we DM on matrix instead of talking about so many (of your) offer's details here? (If determined, any final conclusion about the problem source and the fix will be posted here.)

ghubstan avatar May 08 '22 15:05 ghubstan

And do not use the ripcurlx library anymore. It was fine when released, but not now.

ghubstan avatar May 08 '22 15:05 ghubstan

Ok, my id in matrix is BITCOINTERRA

bitcointerra avatar May 08 '22 15:05 bitcointerra

@ 9-May, ~ 18h15 UTC, my node was able to SendOfferAvailabilityRequest: Send OfferAvailabilityRequest with offerId SbPymDJP-fa5f0400-7e90-4348-8c54-495990cfbca0-184 and uid 1c56d06b-e9b3-497a-98e6-ccc70f69deeb to peer oicmognfxgyxmd7hnircaf5i7kx5vsjaq2dmpnowolcq25r4ugqpf4qd.onion:9999 ... ... TxValidator: Maker tx validation : SUCCESS

(There was no PRICE_OUT_OF_TOLERANCE error.)

ghubstan avatar May 09 '22 18:05 ghubstan

Please, Try now. PRICE_OUT_OF_TOLERANCE again

bitcointerra avatar May 09 '22 19:05 bitcointerra

@ ~ 19h40 UTC, the OfferAvailabilityRequest was successful on my node:

May-09 16:38:39.801 [JavaFX Application Thread] INFO b.c.o.a.OfferAvailabilityProtocol: Send AckMessage for OfferAvailabilityResponse to peer oicmognfxgyxmd7hnircaf5i7kx5vsjaq2dmpnowolcq25r4ugqpf4qd.onion:9999 with offerId SbPymDJP-fa5f0400-7e90-4348-8c54-495990cfbca0-184 and sourceUid 4064fd10-0396-4328-87fe-37521ea9d404 May-09 16:38:39.804 [JavaFX Application Thread] INFO b.c.o.a.OfferAvailabilityProtocol: AckMessage for OfferAvailabilityResponse arrived at makersNodeAddress oicmognfxgyxmd7hnircaf5i7kx5vsjaq2dmpnowolcq25r4ugqpf4qd.onion:9999. offerId=SbPymDJP-fa5f0400-7e90-4348-8c54-495990cfbca0-184, sourceUid=4064fd10-0396-4328-87fe-37521ea9d404 May-09 16:38:40.063 [JavaFX Application Thread] INFO b.core.offer.OpenOfferManager: Received AckMessage for OfferAvailabilityRequest with offerId SbPymDJP-fa5f0400-7e90-4348-8c54-495990cfbca0-184 and uid c8f6c151-9e37-4743-a870-a7a9044babd7 ... ... May-09 16:38:42.376 [JavaFX Application Thread] INFO b.c.p.mempool.TxValidator: Maker tx validation : SUCCESS

I do not doubt you are seeing the problem, but I cannot reproduce on my end, yet.

ghubstan avatar May 09 '22 19:05 ghubstan

Came back. No mistakes. High volatility. Thanks for support

bitcointerra avatar May 09 '22 20:05 bitcointerra