Cancel an order
cancel_orderNo version argument. Cancel an open order. Two routes: pass 'signature' (signed over what prepare_cancel_order returned) to relay a gasless cancellation - state-changing, and the route an intent order takes; omit 'signature' entirely for the on-chain route, which returns the cancel transaction for the user to sign and send, the route an order that went on chain (a native-token sell) takes. The server never signs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"orderId": "<orderId>"
},
"name": "cancel_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderId | Yes | The order id (from submit_signed_order's receipt, get_order_status or get_pending_orders). | |
| signature | No | The user's cancellation signature (0x...) over prepare_cancel_order's typed data. Omit the argument entirely to get the on-chain cancel transaction instead. |