Skip to content

Read deals by time range#


Returns history deals with for a specific time range

GET /users/current/accounts/:accountId/history-deals/time/:startTime/:endTime

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.


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
startTime string(datetime) Yes start of time range, inclusive (in ISO format)
endTime string(datetime) Yes end of time range, exclusive (in ISO format)

Query parameters#

Name Type Required Description
offset number pagination offset, default: 0, min: 0
limit number pagination limit, default: 1000, min: 1, max: 1000


  • 200 - History deals with requested time range 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


Example request:

curl -X GET --header 'Accept: application/json' --header 'auth-token: token' ''

Example response:

    "clientId": "AS_AUDNZD_YSwKkvRe1B",
    "commission": -0.42,
    "entryType": "DEAL_ENTRY_IN",
    "id": "33744217",
    "magic": 1000,
    "platform": "mt5",
    "orderId": "46849507",
    "positionId": "46849507",
    "price": 1.05068,
    "profit": 0,
    "swap": 0,
    "symbol": "AUDNZD",
    "time": "2020-04-20T05:30:04.361Z",
    "brokerTime": "2020-04-20 08:30:04.361",
    "type": "DEAL_TYPE_BUY",
    "volume": 0.12