Cancel a pending order
cancel_orderCancels a pending order on the user's real broker account (or demo) that has not triggered. If it triggered there is a position to close instead. Example: {"order_id": "", "idempotency_key": ""}
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": {
"order_id": "<order_id>",
"idempotency_key": "<idempotency_key>"
},
"name": "cancel_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | The fxapis id of the pending order. | |
| idempotency_key | Yes | A unique string you generate for THIS action, e.g. a fresh UUID. If a call fails or times out and you retry the same action, send the SAME key: fxapis then returns the first result instead of acting twice. Use a new key only for a genuinely new action. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | Yes |