Read account information#
About#
Returns account information for a specified MetaTrader account
GET /users/current/accounts/:accountId/account-information
For more information see Swagger documentation. Note, that this URL is valid for new-york region only. You can find URLs for other regions on API access page.
Headers#
Name | Type | Required | Description |
---|---|---|---|
auth-token | string | Yes | authorization token. See Authentication & authorization |
Path parameters#
Name | Type | Required | Description |
---|---|---|---|
accountId | string | Yes | MetaTrader account id. You can retrieve account id from Web application after you add your MetaTrader account to our platform. The account id can also be obtained via Provisioning API |
Responses:
- 200 - Account information for a specified MetaTrader account returned successfully. Response schema: MetatraderAccountInformation
- 401 - Authorization failed. Response schema: Error
- 404 - MetaTrader account not found or not provisioned yet. Response schema: Error
Examples#
Example request:
curl -X GET --header 'Accept: application/json' --header 'auth-token: token' 'https://mt-client-api-v1.new-york.agiliumtrade.ai/users/current/accounts/865d3a4d-3803-486d-bdf3-a85679d9fad2/account-information'
Example response:
{
"broker": "True ECN Trading Ltd",
"currency": "USD",
"server": "ICMarketsSC-Demo",
"balance": 7319.9,
"equity": 7306.649913200001,
"margin": 184.1,
"freeMargin": 7120.22,
"leverage": 100,
"marginLevel": 3967.58283542,
"tradeAllowed": true,
"marginMode": "ACCOUNT_MARGIN_MODE_RETAIL_HEDGING",
"name": "Will Turner",
"login": 367906877,
"credit": 0,
"accountCurrencyExchangeRate": 1
}