Cancel an order
/dex/orders/{boxId}/cancelapi_keyReturn an outstanding order's ERG and tokens to this wallet. Accepted while the order is PENDING or OPEN. A fill sent before the cancel can still confirm first, and the cancel is then dropped. No body.
Path parameters
boxIdstringrequiredOrder box id, as listed by
GET /dex/orders
Responses
200Result of the cancel transactionLDOrderCancelResult▶
outcomestringrequiredNode submission outcome; uncertain retains the known transaction ID and input ownership.
one ofacceptedrejecteduncertaintxIdstringrequiredreturnedNanoErgsstringrequirednanoERG the order box held, returned to this wallet. Decimal string.
▶
returnedTokensLDTokenAmount[]requiredTokens the order box held, returned to this wallet
tokenIdstringrequiredamountstringrequiredRaw token units. Decimal string.
networkFeestringrequirednanoERG paid for the cancel, taken from the order box when it holds enough and from the wallet otherwise. Decimal string.
404No outstanding order owned by this wallet with that id.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
409An unconfirmed transaction is already filling or cancelling the order. Re-read `GET /dex/orders`.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
422Neither the order nor the wallet can cover the network fee.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
503Node or wallet unavailable. Retry.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
defaultErrorApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description