Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

cancelByCloid

Cancels orders by the cloid supplied when the order was placed. Note that this action's bodies use full field names, not the abbreviated keys used by cancel.

Outcome orders use the same action, with the market's instrument_id as asset.

POST/exchangetype cancelByCloid

Cancel orders by the client order id (a plain string) you set when placing them.Agent-signed

Action fields
cancelsCancelByCloidBody[]required

Cancel bodies; at most 200 per action.

assetinteger · uint32required

Instrument's external id — the `index` value from `perpMeta`; Outcome markets use the `instrument_id`.

cloidstringrequired

Client order id set as `c` on the original order.

groupingstringoptional

Defaults to `na`.

"na""tpsl""trigger"
typestringrequired

Must be `cancelByCloid`.

"cancelByCloid"
Request example
curl -X POST https://rpc.txflow-testnet.xyz/exchange \
  -H "Content-Type: application/json" \
  -H "x-api-version: 2026-08-16" \
  -d '{
  "action": {
    "type": "cancelByCloid",
    "cancels": [
      {
        "asset": 1,
        "cloid": "my-order-001"
      }
    ]
  },
  "signature": {
    "r": "0x<r>",
    "s": "0x<s>",
    "v": 27
  },
  "nonce": 1757992743994,
  "vaultAddress": null,
  "signatureChainId": null
}'
Try it
testnet · no account yet
Generates a throwaway key in your browser, claims testnet USDC and authorizes an agent key. The account is kept while you browse the docs and lost on reload.
Response · CancelOrder 200
codeinteger

`0` on success.

dataobject
dataobject
typestring

The action's internal name, which does not always match the request `type`.

"CancelOrder"
statusstring

A rejected request returns `err` with a non-zero `code` and the reason in `message` (or `response`).

"ok"
Response example
{
  "status": "ok",
  "code": 0,
  "data": {
    "type": "CancelOrder",
    "data": {
      "statuses": [
        "success"
      ]
    }
  }
}

Cancel body

assetinteger · uint32required

Instrument's external id — the `index` value from `perpMeta`; Outcome markets use the `instrument_id`.

cloidstringrequired

Client order id set as `c` on the original order.

groupingstringoptional

Defaults to `na`.

"na""tpsl""trigger"

Next steps

The response type is CancelOrder, the same as cancel. Confirm the result with frontendOpenOrders.