Skip to content

Read deals by ticket#

About#

Returns history deals with a specific ticket number

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

For more information see Swagger documentation. Note, that this URL is valid for new-york region only. You can find URLs for other regions on API access page.

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 (deal id for MT5 or order id for MT4)

Responses:

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

Example response:

[
  {
    "clientId": "TE_GBPUSD_7hyINWqAlE",
    "commission": -0.25,
    "entryType": "DEAL_ENTRY_IN",
    "id": "46648037",
    "magic": 1000,
    "platform": "mt5",
    "orderId": "46214692",
    "positionId": "46214692",
    "price": 1.26101,
    "profit": 0,
    "swap": 0,
    "symbol": "GBPUSD",
    "time": "2020-04-15T02:45:06.521Z",
    "brokerTime": "2020-04-15 05:45:06.521",
    "type": "DEAL_TYPE_BUY",
    "volume": 0.07
  }
]