CancelOrder / Cancel / CancelOrders / CancelAllOrders
Cancels working orders on a CrossTrade-connected account.
Write Action
Cancelling can leave a position without a protective bracket. The agent should confirm what is being cancelled, and the user should approve before the call.
| Property | Value |
|---|---|
| Required scope | mcp:trade |
| Risk | High. Can remove protective orders. |
| Side effects | Cancels one or more working orders. |
When an agent should use it
- After listing orders and identifying specific stale or orphaned IDs.
- With explicit user confirmation per id or list.
When an agent should not use it
- In bulk on an account that holds open positions, unless the user accepts the protective-order removal.
- During a journal review or read-only workflow.
Parameters
Cancel / CancelOrder per id:
{ "account": "Sim101", "order_id": "abc-123" }
CancelOrders for multiple:
{ "account": "Sim101", "order_ids": ["abc-123", "abc-124"] }
CancelAllOrders for everything in one account:
{ "account": "Sim101" }
Response shape
{
"cancelled": ["abc-123", "abc-124"],
"failed": []
}
Example user prompt
On Sim101, list working orders. Identify any that look orphaned (no matching
position). Show me the proposed cancel list. After I confirm, cancel only those
ids and then list orders again.
Example tool call
{ "name": "Cancel", "arguments": { "account": "Sim101", "order_id": "abc-123" } }
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
order_not_found | Already filled, rejected, or stale id. | Re-list orders. |
Partial failed array | Some IDs are no longer working. | Re-list orders and decide whether to retry. |
Safe workflow placement
ListOrders → build proposed list → user confirms → Cancel* → ListOrders
After CancelAllOrders on an account that holds positions, the position may be unprotected. Consider following up with a fresh bracket placement.