Build the EIP-712 payload to cancel an unfilled order on-chain.
Returns cancel_safe_tx_eip712, an EIP-712 payload that authorizes
the on-chain cancellation. Sign with the Tokenized Assets Account’s
owner via wallet.signTypedData(...) and relay via
POST /v2/gas_sponsorship/prepare so the sponsor broadcasts the
cancellation on the product account. The owner can also broadcast
the resulting transaction directly without using gas sponsorship.
Cancellation works on pending and expired orders only. Only the
Tokenized Assets Account that placed the order can cancel it.
Documentation Index
Fetch the complete documentation index at: https://docs.compasslabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
Wallet that owns the Tokenized Assets Account. The account address derived from this owner must match the order's on-chain maker; the API rejects otherwise (only the order's maker can cancel it).
Successful Response
EIP-712 payload that authorizes the on-chain cancellation. Sign with wallet.signTypedData(...) from the Tokenized Assets Account's owner, then broadcast via POST /v2/gas_sponsorship/prepare or have the owner broadcast the resulting transaction directly.
{
"domain": {
"chainId": 8453,
"verifyingContract": "0x6B90E8B4E3E971E74C1A47a3a20976377E2dB4b1"
},
"message": {
"baseGas": "0",
"data": "0x8d80ff0a0000000000000000000000000000000000000000000000000000000000000020",
"gasPrice": "0",
"gasToken": "0x0000000000000000000000000000000000000000",
"nonce": "7",
"operation": 1,
"refundReceiver": "0x0000000000000000000000000000000000000000",
"safeTxGas": "0",
"to": "0x93C23AAE4793C14D6DF35D2A2A2234204e1559dA",
"value": "0"
},
"primaryType": "SafeTx",
"types": {
"EIP712Domain": [
{ "name": "chainId", "type": "uint256" },
{
"name": "verifyingContract",
"type": "address"
}
],
"SafeTx": [
{ "name": "to", "type": "address" },
{ "name": "value", "type": "uint256" },
{ "name": "data", "type": "bytes" },
{ "name": "operation", "type": "uint8" },
{ "name": "safeTxGas", "type": "uint256" },
{ "name": "baseGas", "type": "uint256" },
{ "name": "gasPrice", "type": "uint256" },
{ "name": "gasToken", "type": "address" },
{
"name": "refundReceiver",
"type": "address"
},
{ "name": "nonce", "type": "uint256" }
]
}
}