Docs
Accounts

Delete an account and its history

DELETE
/v1/accounts/{id}

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
AuthorizationBearer <token>

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

id*string
Formatuuid

Query Parameters

force?string

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