Skip to content

Get tracker events stream#

About#

Returns tracker events stream

GET /users/current/tracker-events/stream

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)

Query parameters#

Name Type Required Description
previousSequenceNumber integer value of the last consumed sequence number to start streaming from, default: 0
accountId string id of the MetaApi account
trackerId string id of the tracker
limit integer pagination limit, default: 1000, min: 1, max: 1000

Response#

Responses:

  • 200 - Tracker events returned successfully. Response schema: Array<TrackerEvent>
  • 401 - Authorization failed. 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/tracker-events/stream'

Example response:

[
  {
    "sequenceNumber": 1,
    "accountId": "105646d8-8c97-4d4d-9b74-413bd66cd4ed",
    "trackerId": "ABCD",
    "startBrokerTime": "2020-08-24 00:00:00.000",
    "endBrokerTime": "2020-08-24 00:00:00.000",
    "period": "day",
    "brokerTime": "2020-08-24 00:00:00.000",
    "absoluteDrawdown": 10000,
    "relativeDrawdown": 0.1,
    "absoluteProfit": 5000,
    "relativeProfit": 0.05,
    "exceededThresholdType": "drawdown"
  }
]