spec: add nomatch notification#535
Conversation
|
Basing it on the preimage submission rules out missed epochs that you'd have to guess about if you just based it on the order submissions. |
They won't receive a
I could use some clarification on this. Not sure I follow. |
|
Good point about no matches. Regarding preimage submission ruling out missed epochs, I mean that if the server requests a preimage for a given order, you know that order will go through matching in that epoch rather than falling into the next epoch by a hair if you just guessed based on your order submission time. |
| It is also possible for an order to go through the matching cycle without | ||
| generating a match. This will be common for limit orders, but can also occur for | ||
| market orders if there are no booked orders to match with. When the server fails | ||
| to find any matches, a <code>nomatch</code> notification will be sent to the | ||
| client. |
| redemption transaction. | ||
|
|
||
| It is also possible for an order to go through the matching cycle without | ||
| generating a match. This will be common for limit orders, but can also occur for |
There was a problem hiding this comment.
Common for limit orders with time-in-force "immediate" would be clearer I think. Oh, were you thinking nomatch would be sent for limit orders that get booked too? That seems a little unnecessary because the client does not need to take any action for unmatched but booked limit orders.
There was a problem hiding this comment.
It actually solves a small problem that I've been cheating around. See (*trackedTrade).processEpoch. For standing limit orders, I'm setting them as booked as soon as I know their epoch has passed, but that isn't necessarily accurate, since if they fill they are never actually booked. Having a nomatch notification allows me to set them as booked confidently in either negotiate or via the upcoming handleNoMatch function.
|
Looks good once the additional space is resolved. Wondering if its possible to reduce the number notifications that'd be generated for long standing market orders with too high/too low of a price. With the current spec a |
Only orders from the epoch queue will receive these notifications. Booked orders don't get subsequent notifications every match cycle. I've added a word to specify epoch orders only. Thanks. |
If there is no match for an order, the client must currently infer that from the match proof. This PR adds a
nomatchnotification when the client's order does not match during the match cycle. The notification will be sent for market and limit orders (regardless of time-in-force). This is just one possible solution the issue raised in #525 (review).