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": ""}
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 |