Skip to content

Read history orders by ticket#

About#

Returns the history of completed orders for a specific ticket number

GET /users/current/accounts/:accountId/history-orders/ticket/:ticket

For more information see Swagger documentation

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
ticket string Yes ticket number (order id)

Responses:

  • 200 - History orders with requested ticket number for a specified MetaTrader account returned successfully. Response schema: Array<MetatraderOrder>
  • 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.agiliumtrade.agiliumtrade.ai/users/current/accounts/865d3a4d-3803-486d-bdf3-a85679d9fad2/history-orders/ticket/46648037'

Example response:

[
  {
    "clientId": "AS_AUDNZD_3zfxXl3RvJ",
    "currentPrice": 1.05782,
    "currentVolume": 0,
    "doneTime": "2020-04-17T04:30:03.223Z",
    "doneBrokerTime": "2020-04-17 07:30:03.223",
    "id": "46648037",
    "magic": 1000,
    "platform": "mt5",
    "positionId": "46648037",
    "state": "ORDER_STATE_FILLED",
    "symbol": "AUDNZD",
    "time": "2020-04-17T04:30:02.966Z",
    "brokerTime": "2020-04-17 07:30:02.966",
    "type": "ORDER_TYPE_BUY",
    "volume": 0.12
  }
]