cancel
Cancels orders by exchange-assigned order id. To cancel by your own client order id, use cancelByCloid.
cancelCancel orders by the exchange-assigned order id.Agent-signed
Cancel bodies; at most 200 per action.
Instrument's external id — the `index` value from `perpMeta`; Outcome markets use the `instrument_id`. Long form: `asset`.
Order id to cancel, as an integer. A numeric string is parsed too, but the node hashes the value as an integer, so sign it as one. Long form: `oid`.
Selects which order family the id refers to. Defaults to `na`.
"na""tpsl""trigger"Must be `cancel`.
"cancel"curl -X POST https://rpc.txflow-testnet.xyz/exchange \
-H "Content-Type: application/json" \
-H "x-api-version: 2026-08-16" \
-d '{
"action": {
"type": "cancel",
"cancels": [
{
"a": 1,
"o": 123456789
}
]
},
"signature": {
"r": "0x<r>",
"s": "0x<s>",
"v": 27
},
"nonce": 1757992743994,
"vaultAddress": null,
"signatureChainId": null
}'`0` on success.
The action's internal name, which does not always match the request `type`.
"CancelOrder"A rejected request returns `err` with a non-zero `code` and the reason in `message` (or `response`).
"ok"{
"status": "ok",
"code": 0,
"data": {
"type": "CancelOrder",
"data": {
"statuses": [
"success"
]
}
}
}Cancel body
Instrument's external id — the `index` value from `perpMeta`; Outcome markets use the `instrument_id`. Long form: `asset`.
Order id to cancel, as an integer. A numeric string is parsed too, but the node hashes the value as an integer, so sign it as one. Long form: `oid`.
Selects which order family the id refers to. Defaults to `na`.
"na""tpsl""trigger"Next steps
The response is a single success for the whole action and does not report which orders were cancelled — confirm the result with frontendOpenOrders.
For an Outcome order, a is the market's instrument_id. Confirm it with
outcomeFrontendOpenOrders and follow
the result on
outcomeOrderUpdates.