Delete an account and its history
Removes the account for good: its terminal is stopped, its password erased, and the record deleted with its orders, deals and positions. This cannot be undone. To stop trading on an account but keep its history readable, disconnect it instead.
Refused with 409 while an order is in flight (ACCOUNT_EXECUTING), while a multi-account order that includes it has not finished (ACCOUNT_IN_WAVE), and when our last look found open positions (ACCOUNT_HAS_POSITIONS): those stay open at the broker with their stops, but could no longer be shown or closed here. Close them first, or send force=true to delete anyway.
Alert hooks stop sending to the account; a hook left with no accounts is switched off. This month's usage is unaffected. The same login and server can be connected again afterwards, as a new account.
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
uuidQuery Parameters
true deletes even with open positions, which stay open at the broker.
Value in
- "true"
- "false"
Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "data": { "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "deleted": true, "removed": { "orders": 0, "deals": 0, "positions": 0, "alertHooksUpdated": 0 } }}Connect an MT5 account POST
Stores the account and encrypts its password. It does **not** log in: the account lands in `created`, and connects when you bring it online or when the first order arrives on a `warm_on_demand` account. **Reconnecting.** If this login and server were connected before and then disconnected, the same account comes back — its id and history kept — with the new password, and the answer is `200` instead of `201`. If they are still connected, the answer is `409 ACCOUNT_EXISTS` with the account's id; to change its password, use `POST /v1/accounts/{id}/password`.
Fetch one account GET
One connected account: its login, server, label, mode, current state and when it last changed. The password is never included. Another workspace's account is 404.