Cancel Intent Order#
Cancel an existing intent order. Obtain the signature by signing the data returned from the Get Cancel Order Sign Data endpoint with the order owner's wallet.
Request URL#
POST
https://web3.okx.com/api/v6/dex/aggregator/intent/cancel-orderRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| userWalletAddress | String | Yes | The wallet address of the order owner. |
| orderUid | String | Yes | The unique identifier of the intent order to be cancelled. |
| signature | String | Yes | The EIP-712 signature produced by signing the signData returned from the Get Cancel Order Sign Data endpoint. |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| orderUid | String | The unique identifier of the cancelled order. Returns null if the cancellation failed. |
| status | String | The cancellation result. Possible values: success, failed. |
Request Example#
shell
curl --location --request POST 'https://web3.okx.com/api/v6/dex/aggregator/intent/cancel-order' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z' \
--header 'Content-Type: application/json' \
--data-raw '{
"userWalletAddress": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4",
"orderUid": "0xfa2506196276f31c6bf7f4a2f02f3bd5ad80ed91354441ce4d5f28c87021e64c5b38da6a701c568545dcfcb03fcb875f56beddc469bbd743",
"signature": "0x1234567890abcdef..."
}'
Response Example#
Success#
json
{
"code": "0",
"data": [
{
"orderUid": "0xfa2506196276f31c6bf7f4a2f02f3bd5ad80ed91354441ce4d5f28c87021e64c5b38da6a701c568545dcfcb03fcb875f56beddc469bbd743",
"status": "success"
}
],
"msg": ""
}
Failed#
json
{
"code": "0",
"data": [
{
"orderUid": null,
"status": "failed"
}
],
"msg": ""
}
