Balance, equity and margin
The account's money as its MetaTrader terminal reports it: balance, equity, margin, free margin, margin level, credit and open profit, as decimal strings in the account's currency.
Without fresh, the last read: taken every 15 seconds while the account is online (every 60 seconds from a terminal not yet updated), with observedAt saying when. With fresh=true, the terminal is asked now — the account must be ready (409 ACCOUNT_NOT_READY otherwise, including while it is executing an order or degraded), its terminal must be recent enough to report figures on demand (501 CAPABILITY_UNAVAILABLE until it is updated), callers within the same second share one read, and only a read that reaches the terminal is charged to the account's live budget (300 a minute + 50 across every caller; 429 RATE_LIMITED with retry-after past it).
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 asks the account's terminal now (the account must be online), charged to the account's live budget when the terminal is asked. Without it, the last read.
Value in
- "true"
- "false"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/figures"{ "data": { "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9", "balance": "10012.25000000", "equity": "10012.25000000", "margin": "10012.25000000", "freeMargin": "10012.25000000", "marginLevel": "10012.25000000", "credit": "10012.25000000", "profit": "10012.25000000", "currency": "USD", "leverage": 500, "marginMode": "netting", "observedAt": null, "ageMs": null, "source": "live" }}Conventions
Every endpoint of the fxapis API, generated from its OpenAPI description.
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`.