Follow a multi-account order
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 GET "https://api.fxapis.com/v1/execution-waves/ACCOUNT_ID" \
-H "Authorization: Bearer YOUR_API_KEY"Poll this after creating a multi-account order. state moves planned → preparing → armed → releasing → settled: accepted, bringing accounts online, waiting for executeAt, sending, and every account has a result. cancelled and abandoned mean nothing was sent.
Each account in legs carries its own state and its own order id — an account's order is an ordinary order, confirmed with the broker and audited like any other.
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
curl -X GET "https://api.fxapis.com/v1/execution-waves/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "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" }}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`.
List multi-account orders GET
Multi-account orders in this workspace, newest first, with each one's state, symbol, side, number of accounts and summary of results.