Get tracking stats#
About#
Returns account profit and drawdown tracking statistics by tracker id
GET /users/current/accounts/:accountId/trackers/:id/statistics
For more information see Swagger documentation
Note: a backward incompatible update is planning for this endpoint, so in order to guarantee the backward compatibility of an application, the api-version
header must be set to 1
(current default value). In the future update its default value will be changed to 2
.
Headers#
Name | Type | Required | Description |
---|---|---|---|
auth-token | string | Yes | authorization token. See Authentication & authorization |
api-version | number | request version, default is 1 (will be changed in the future, see the note above) |
Path parameters#
Name | Type | Required | Description |
---|---|---|---|
accountId | string | Yes | id of the MetaApi account |
id | string | Yes | id of the tracker |
Query parameters#
Name | Type | Required | Description |
---|---|---|---|
startTime | string | time to start loading stats from, in YYYY-MM-DD HH:mm:ss.SSS format. Default is current time. Note that stats is loaded in backwards direction | |
limit | integer | number of records to load, default: 1 |
|
realTime | boolean | if true, real-time data will be requested |
Response#
Responses:
- 200 - Profit and drawdown statistics returned successfully. Response schema: Array<PeriodStatistics>
- 401 - Authorization failed. Response schema: Error
- 404 - MetaApi account not found. Response schema: Error
Examples#
Example request:
curl -X GET --header 'Accept: application/json' --header 'auth-token: token' 'https://risk-management-api-v1.new-york.agiliumtrade.ai/users/current/accounts/105646d8-8c97-4d4d-9b74-413bd66cd4ed/trackers/ABCD/statistics'
Example response:
[
{
"startBrokerTime": "2020-08-24 00:00:00.000",
"endBrokerTime": "2020-08-25 00:00:00.000",
"period": "day",
"initialBalance": 10000,
"maxDrawdownTime": "2020-08-25 00:00:00.000",
"maxAbsoluteDrawdown": 10000,
"maxRelativeDrawdown": 0.1,
"maxAbsoluteProfit": 5000,
"maxRelativeProfit": 0.05,
"thresholdExceeded": true,
"exceededThresholdType": "drawdown"
}
]