MetaApi GET /users/current/accounts/{accountId}/account-information
Read the MetaTrader account's balance, equity, margin, free margin, leverage and currency, with its broker and server.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found or not yet provisioned. The reply is the MetatraderAccountInformation model. The mock reply uses the field names of the page's example with invented values, and keeps the two enum values the example shows.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| accountIdrequired | path | string | The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required. |
| refreshTerminalState | query | boolean | Whether to refresh the terminal state before reading, which slows the request. Defaults to false. The page leaves its required column empty. |
Authentication headers
| Name | Type | Description |
|---|---|---|
| auth-tokenrequired | string | The MetaApi authorisation token, from the MetaApi web application. Marked required. Placeholder only: never paste a real token into this site. |
Request
Written from the method, path and parameters recorded on this page. No demo host is recorded as a plain address for this API, so the samples read the base address from an environment variable. Not executed against a live or demo account. Credentials are read from environment variables on your own machine and are never entered on this site. The request builder writes these same snippets, from the same record.
Python
# Set METAAPI_BASE_URL, METAAPI_TOKEN, METAAPI_ACCOUNT_ID as environment variables first. Never paste real values into code.
# No demo host is recorded as a plain address for this API, so the base address is read from METAAPI_BASE_URL.
# Optional and not shown: query parameters refreshTerminalState.
import os
import requests
BASE_URL = os.environ["METAAPI_BASE_URL"]
headers = {
"auth-token": os.environ["METAAPI_TOKEN"],
}
resp = requests.get(BASE_URL + "/users/current/accounts/" + os.environ["METAAPI_ACCOUNT_ID"] + "/account-information", headers=headers, timeout=10)
resp.raise_for_status()
print(resp.json())JavaScript
// Set METAAPI_BASE_URL, METAAPI_TOKEN, METAAPI_ACCOUNT_ID as environment variables first. Never paste real values into code.
// No demo host is recorded as a plain address for this API, so the base address is read from METAAPI_BASE_URL.
// Optional and not shown: query parameters refreshTerminalState.
// Run as a module, for example a .mjs file, on a Node version that has fetch built in.
const BASE_URL = process.env.METAAPI_BASE_URL;
const res = await fetch(BASE_URL + "/users/current/accounts/" + process.env.METAAPI_ACCOUNT_ID + "/account-information", {
method: "GET",
headers: {
"auth-token": process.env.METAAPI_TOKEN,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());curl
# Set METAAPI_BASE_URL, METAAPI_TOKEN, METAAPI_ACCOUNT_ID as environment variables first. Never paste real values into code. # No demo host is recorded as a plain address for this API, so the base address is read from METAAPI_BASE_URL. # Optional and not shown: query parameters refreshTerminalState. curl -X GET "$METAAPI_BASE_URL/users/current/accounts/$METAAPI_ACCOUNT_ID/account-information" \ -H "auth-token: $METAAPI_TOKEN"
Response
A mock response. The values are invented, so check field names against the official reference.
{
"_mock": true,
"broker": "Mock Broker Ltd",
"currency": "USD",
"server": "Mock-Demo",
"balance": 10000,
"equity": 10000,
"margin": 0,
"freeMargin": 10000,
"leverage": 100,
"marginLevel": 0,
"tradeAllowed": true,
"marginMode": "ACCOUNT_MARGIN_MODE_RETAIL_HEDGING",
"name": "Mock Trader",
"login": 1,
"credit": 0,
"accountCurrencyExchangeRate": 1,
"type": "ACCOUNT_TRADE_MODE_DEMO"
}Limits that apply at MetaApi
| Limit | Value | Scope | Source |
|---|---|---|---|
| CPU credits per account | 5,000 CPU credits per 10 seconds | Per MetaTrader account. REST and RPC calls only | metaapi.cloudchecked |
| CPU credits an hour, per application | 18,000 | Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requests | metaapi.cloudchecked |
| CPU credits a minute, per application | 6,000 | Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requests | metaapi.cloudchecked |
| CPU credits a second, per application | 1,000 | Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requests | metaapi.cloudchecked |
| Concurrent historical market data requests | 5 | Per MetaTrader account, historical market data API only | metaapi.cloudchecked |
| CPU credits a second, per server | 2,000 | Per shared front end server. REST and RPC calls only, counted in CPU credits and not in requests | metaapi.cloudchecked |