Get Cancel Order Sign Data#
Retrieve the EIP-712 signing data required to cancel an intent order. After receiving the signData, sign it with the order owner's wallet and submit the result to the cancel order endpoint.
Request URL#
POST
https://web3.okx.com/api/v6/dex/aggregator/intent/cancel-signdataRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| userWalletAddress | String | Yes | The wallet address of the order owner. |
| orderUid | String | Yes | The unique order identifier of the intent order to be cancelled. |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| signData | Object | EIP-712 structured data that the order owner must sign to authorize the cancellation. |
| primaryType | String | The primary EIP-712 type. Value: CancelOrder. |
| domain | Object | The EIP-712 domain separator. |
| name | String | Domain name. Value: OKX Intent Swap. |
| version | String | Domain version. |
| chainId | Integer | The chain ID of the order. |
| verifyingContract | String | The contract address used to verify the signature. |
| message | Object | The cancellation payload to be signed. |
| orderUid | String | The unique identifier of the order to be cancelled. |
| types | Object | EIP-712 type definitions used for structured data encoding. |
| EIP712Domain | Array | Type definitions for the domain separator fields. |
| CancelOrder | Array | Type definitions for the cancellation message fields. |
Request Example#
shell
curl --location --request POST 'https://web3.okx.com/api/v6/dex/aggregator/intent/cancel-signdata' \
--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"
}'
Response Example#
json
{
"code": "0",
"msg": "",
"data": {
"signData": {
"domain": {
"chainId": 1,
"name": "OKX Intent Swap",
"verifyingContract": "0x1111111254fb6c44bac0bed2854e76f90643097d",
"version": "1"
},
"message": {
"orderUid": "0xfa2506196276f31c6bf7f4a2f02f3bd5ad80ed91354441ce4d5f28c87021e64c5b38da6a701c568545dcfcb03fcb875f56beddc469bbd743"
},
"primaryType": "CancelOrder",
"types": {
"CancelOrder": [
{ "name": "orderUid", "type": "bytes" }
],
"EIP712Domain": [
{ "name": "name", "type": "string" },
{ "name": "version", "type": "string" },
{ "name": "chainId", "type": "uint256" },
{ "name": "verifyingContract", "type": "address" }
]
}
}
}
}
