You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Placed order blocks part of max sell/ max buy amount.
But when user tries to replace this orders, xud uses reserved amount of order that should be replaced in tradinglimits calculation.
As a resultm user cant place order
Example:
max sell ETH = 1 ETH, max buy BTC = 0.1 BTC
placeorder sell 0.95 ETH/BTC 0.1 my-id-> order placed
max sell ETH = 1 - 0,95 = 0.05, max buy BTC = 0.1 - 0,095 = 0.005 BTC
placeorder sell 0.948 ETH/BTC 0.1 -r my-id -> err because of max sell and max buy
Expected behavior:
On step 4 (on trading limits check) we should increase maxsell/maxbuy values by 0.95 ETH/ 0.095 BTC (amount that were used in old order).
The text was updated successfully, but these errors were encountered:
@sangaman the problem in simple words seems to be: when replacing an order we currently do not remove reserved order amounts of the old order from tradinglimits, which is when the channel capacity is not large enough to cover the second new order, replacing fails.
Fix should be as simple as removing reserved quantity from tradinglimits as intermediate step in the replace process.
This fixes a bug in the logic to calculate whether a request to place
a new order exceeds the available capacity and trading limits by
properly accounting for the quantity that is being replaced by the new
order request. Previously, this was not accounted for and attempting
to replace an order, even if not changing quantity, could result in
an error due to exceeding the trading capacity.
Closes#1999.
This fixes a bug in the logic to calculate whether a request to place
a new order exceeds the available capacity and trading limits by
properly accounting for the quantity that is being replaced by the new
order request. Previously, this was not accounted for and attempting
to replace an order, even if not changing quantity, could result in
an error due to exceeding the trading capacity.
Closes#1999.
Case:
Example:
placeorder sell 0.95 ETH/BTC 0.1 my-id
-> order placedplaceorder sell 0.948 ETH/BTC 0.1 -r my-id
-> err because of max sell and max buyExpected behavior:
On step 4 (on trading limits check) we should increase maxsell/maxbuy values by 0.95 ETH/ 0.095 BTC (amount that were used in old order).
The text was updated successfully, but these errors were encountered: