Orders
Cancel Order
Withdraw a resting order and release what it reserved
DELETE
Cancels an order that is still
OPEN or PARTIALLY_FILLED. Only the wallet that placed the order can cancel it: userAddress must match the order’s owner, and a mismatch reads the same as a missing order.
Filled, expired and already-cancelled orders return ORDER_NOT_FOUND. Cancelling is idempotent in effect. A second attempt on the same order fails the same way as an order that never existed.
Orders placed through the off-chain surface belong to a customer reference rather than a wallet and are cancelled with Cancel Off-Chain Order.
Path Parameters
string
required
The order’s
orderId, as returned when it was submitted. Up to 100 characters.Body Parameters
string
required
Wallet that placed the order.
Releasing the reservation
The order row is markedCANCELLED first, so the depth disappears immediately. Releasing the custody lock behind it is attempted afterwards, and a failure there is logged rather than surfaced: the cancel still succeeds, and the lock is retried by the balance lock reconciler.
Only the unfilled remainder is released. A lock that is already PENDING, FAILED or RELEASED is left alone.
Response Fields
Returns the cancelled order.object
