Read accounts
About
Returns trading 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 |
api-version | string | Api version, allowed values are 1 and 2 (defaults to 1 ) |
Query parameters
Name | Type | Required | Description |
---|---|---|---|
provisioningProfileId | string | Describes which provisioning profile the account belongs to (if it was used) | |
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 and cloud-g2 . 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
- 200 - Accounts list. Response schema(default): Array<TradingAccount>. Response schema for api-version 2: TradingAccountsList.
- 401 - Authorization failed. Response schema: Error
- 403 - Method or resource access permissions are missing. Response schema: Error
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 (default):
[
{
"_id": "1eda642a-a9a3-457c-99af-3bc5e8d5c4c9",
"login": "50194988",
"name": "mt5a",
"server": "ICMarketsSC-Demo",
"magic": 123456,
"connectionStatus": "DISCONNECTED",
"state": "DEPLOYED",
"type": "cloud-g2",
"region": "vint-hill",
"manualTrades": true,
"quoteStreamingIntervalInSeconds": 2.5,
"tags": [],
"reliability": "high",
"baseCurrency": "USD",
"copyFactoryRoles": ["PROVIDER"],
"resourceSlots": 1,
"copyFactoryResourceSlots": 4,
"version": 4,
"hash": 18093,
"primaryReplica": true,
"userId": "7b17e36a88502fd2faae5dd9d2166873",
"accountReplicas": [],
"metastatsApiEnabled": false,
"riskManagementApiEnabled": false,
"createdAt": "2022-12-11T09:09:27.454Z"
}
]
Example response for api-version 2:
{
"count": 1,
"items": [
{
"_id": "1eda642a-a9a3-457c-99af-3bc5e8d5c4c9",
"login": "50194988",
"name": "mt5a",
"server": "ICMarketsSC-Demo",
"magic": 123456,
"connectionStatus": "DISCONNECTED",
"state": "DEPLOYED",
"type": "cloud-g2",
"region": "vint-hill",
"manualTrades": true,
"quoteStreamingIntervalInSeconds": 2.5,
"tags": [],
"reliability": "high",
"baseCurrency": "USD",
"copyFactoryRoles": ["PROVIDER"],
"resourceSlots": 1,
"copyFactoryResourceSlots": 4,
"version": 4,
"hash": 18093,
"primaryReplica": true,
"userId": "7b17e36a88502fd2faae5dd9d2166873",
"accountReplicas": [],
"metastatsApiEnabled": false,
"riskManagementApiEnabled": false,
"createdAt": "2022-12-11T09:09:27.454Z"
}
]
}