Close a multi-account order's positions
close_multi_account_orderCloses, on the user's real broker accounts (or demo), the positions a settled multi-account order opened, every account at once, and reports each account: closed, not_found, rejected, unresolved or skipped. Confirm it with the user first; reuse an idempotency_key only to retry the same close. Example: {"multi_account_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": {
"multi_account_order_id": "<multi_account_order_id>",
"idempotency_key": "<idempotency_key>"
},
"name": "close_multi_account_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_ids | No | Optional: close only these accounts of the order. Omit to close every account's position. | |
| 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. | |
| multi_account_order_id | Yes | The multi-account order id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| close | Yes |