Cancel an order
cancel_orderCancel a single order by clientId. For SHORT_TERM pass goodTilBlock; for LONG_TERM/CONDITIONAL pass goodTilTimeSeconds (the original good-til value, available from get_open_orders). Returns confirmation with the verified result (canceled / still_open / filled / pending): code: 0 only means the cancel was broadcast. If still_open, the goodTil value likely did not match the original — retry.
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": {
"market": "<market>",
"clientId": "<clientId>",
"orderFlags": "<orderFlags>"
},
"name": "cancel_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| market | Yes | ||
| confirm | No | Verify the cancel actually took via the indexer (default true). | |
| clientId | Yes | ||
| orderFlags | Yes | ||
| goodTilBlock | No | ||
| goodTilTimeSeconds | No |