Skip to content

Read accounts

About

Returns MetaTrader accounts belonging to the current user

GET /users/current/accounts

For more information see swagger documentation

Headers

Name Type Required Description
auth-token string Yes Authorization token. See Authentication and authorization

Query parameters

Name Type Required Description
provisioningProfileId string Describes which provisioning profile the account belongs to
offset number Accounts search offset (defaults to 0) (must be greater or equal to 0)
limit number Accounts search limit (defaults to 1000) (must be greater or equal to 1 and less or equal to 1000)
version Array Allowed values are 4 and 5. Versions of the searched accounts
type Array Allowed values are cloud, cloud-g1, cloud-g2 and self-hosted. Types of the searched accounts
deploymentStatus Array Allowed values are deployed, undeployed, failed. Deployment statuses of the searched accounts
query string Searches over _id, name, server and login to match query

Response

Examples

Example request:

curl -X GET --header 'Accept: application/json' --header 'auth-token: token' 'https://mt-provisioning-api-v1.agiliumtrade.agiliumtrade.ai/users/current/accounts?provisioningProfileId=f9ce1f12-e720-4b9a-9477-c2d4cb25f076'

Example response:

[
  {
    "_id": "1eda642a-a9a3-457c-99af-3bc5e8d5c4c9",
    "login": "50194988",
    "name": "mt5a",
    "server": "ICMarketsSC-Demo",
    "provisioningProfileId": "f9ce1f12-e720-4b9a-9477-c2d4cb25f076",
    "magic": 123456,
    "application": "MetaApi",
    "connectionStatus": "DISCONNECTED",
    "state": "DEPLOYED",
    "type": "cloud",
    "accessToken": "2RUnoH1ldGbnEneCoqRTgI4QO1XOmVzbH5EVoQsA"
  }
]