ExchangeUnion / xud

Exchange Union Daemon 🔁 ⚡️
https://exchangeunion.com
GNU Affero General Public License v3.0
115 stars 44 forks source link

No reason given for "no matches" of small market orders #1848

Open raladev opened 4 years ago

raladev commented 4 years ago

Steps:

  1. place sell 0.92168142 ETH/BTC 0.03471718 order as a maker
  2. try to fill it as a taker - buy 0.00002 ETH/BTC mkt

Actual result: 'No matches' message

Expected result: also cli output/placeorder response should contain message with reason of unmatching (0.92168142*0.00002 < 100 sat)

Screenshot from 2020-08-28 16-48-35

kilrau commented 4 years ago

This is because of the dust order change. Agree that there should be a message saying the order not meeting the minimum quantity.

sangaman commented 4 years ago

I wouldn't describe this as a bug, this functionality just doesn't exist currently. We discussed a similar topic in another issue or PR (informing the user why a dust order was discarded) but we don't currently have any sort of field on the grpc response to explain why there was no match or why an order was discarded. So we could add something like this, an informational message/field that gives the user details about the matching perhaps, but it would be a new feature.

kilrau commented 4 years ago

Agree that it's no a bug per se. Sounds like what should be done!

rsercano commented 4 years ago

May I have a look at this?

kilrau commented 4 years ago

Sure, just to clarify: this is about adding a field in the grpc response to specify why the order was discarded ("quantity below threshold") and to display this reason on the cli.

rsercano commented 3 years ago

As I checked this in deep, I don't think this's about adding a new field to grpc, for limit orders as @raladev showed we're already throwing an error and showing the error message, but for market orders, there's only one check for dust orders and it checks only order quantity and there's no order.quantity*order.price calculation naturally because price is not clear unless we read it from orderbook.

Therefore, let me know how to proceed with this please? @sangaman @raladev @kilrau

kilrau commented 3 years ago

Thanks for looking into it. I still believe this is about adding a new field to the grpc response. Maybe @sangaman can weigh in with a concrete implementation proposal. Until then lets hold off on this issue.