Cancel a multi-account order before it is sent
Request
Synthetic example for the production API. Replace YOUR_API_KEY and the ids. Do not send it against a live account until you mean to.
curl -X POST "https://api.fxapis.com/v1/execution-waves/ACCOUNT_ID/cancel" \
-H "Authorization: Bearer YOUR_API_KEY"Only while nothing has been sent. Once orders are going out there is no cancelling them — cancelled would claim nothing was sent, and that is exactly the promise we can no longer make.
Authorization
apiKey Authorization: Bearer fx_live_<id>_<secret>.
A key is shown once, at creation. We cannot show it again or recover it for you.
Keys carry a label (live or test) in the key itself, so each configuration is easy to tell
apart. Both reach real brokers: test with a broker demo account.
Scopes are per key. A key without accounts:write can read accounts and nothing else.
In: header
Path Parameters
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.fxapis.com/v1/execution-waves/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel"{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "label": null, "clientWaveId": null, "symbol": null, "instrument": null, "side": "buy", "baseVolume": null, "state": "planned", "stateDetail": null, "barrierPolicy": "release-ready", "executeAt": null, "expiresAt": null, "preparedAt": null, "releasedAt": null, "settledAt": null, "dispatchSpreadMs": null, "retryOf": null, "retriedBy": [ "8a956f19-098d-41a0-9786-bbb5b13b13aa" ], "summary": { "total": 0, "filled": 0, "partiallyFilled": 0, "rejected": 0, "skipped": 0, "unresolved": 0 }, "legs": [ { "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "orderId": null, "symbol": "XAUUSD.a", "volume": null, "state": "pending", "stateDetail": null, "filledVolume": "0.01", "partiallyFilled": true, "sentAt": null, "settledAt": null } ], "createdAt": "2019-08-24T14:15:22Z" }}List orders GET
Every order this workspace has placed, newest first, across all accounts unless `accountId` narrows it. Filter by `state` to find what needs attention — `state=unknown` is the set whose result we are still confirming with the broker. Paginated by cursor rather than offset: an offset shifts as new orders arrive, so page two would silently skip rows.
Close the positions a multi-account order opened POST
Closes, on every account at once, the position each `filled` account's order opened, and answers with a result for each account. Each close is an ordinary close order, placed exactly as `POST /v1/accounts/{id}/positions/{positionId}/close` places one: never refused for the plan's allowance, refused when trading is switched off. Send `accountIds` to close only some accounts. **An `Idempotency-Key` is required.** A repeated close would not close twice; it would open opposing positions. Each account's close is keyed from yours, so the same key again answers with the first result (`idempotent-replay: true`) and never sends a second close. Per account, `result` is `closed`, `not_found` (already closed), `rejected` (the broker refused), `unresolved` (sent, result being confirmed: **do not resend**; poll `closeOrderId`) or `skipped` (nothing sent; `detail` says why). Only once the order has ended; before that, **409** `WAVE_NOT_ENDED`.