Returns a list of all the trades for a specific account.
/trades
{
"result": "success",
"status": 200,
"meta": {
"count": 1000,
"limit": 1000,
"order": "desc",
"last_id": 767898156
},
"data": [
{
"id": 841268463,
"created_at": "2023-04-13T12:09:41Z",
"updated_at": "2023-04-13T12:13:34Z",
"state": "open",
"account_id": 123456,
"ticket": 312334567,
"type": "buy",
"symbol": "EURCHF",
"lots": 0.1,
"open_time": "2023-04-13T15:09:41Z",
"open_price": 0.6783,
"stop_loss": 0,
"take_profit": 0,
"close_time": null,
"close_price": 0.9833,
"commission": 0,
"swap": 0,
"profit": 0.22,
"comment": "trade comment",
"magic": 12345678,
"digits": 5,
"tick_value": 1.11613,
"tick_size": 1.0e-5
},
.....more trades.....
]
}
Key | Value | Description |
---|---|---|
id | single integer | Find a specific trade |
ids | comma separated list of integers | Find multiple trades |
account_id | single integer | Find trades by account |
account_ids | comma separated list of integers | Find trades by multiple accounts |
state | open or closed | Whether trade is open or closed |
open_time_start | datetime (format YYYY-MM-DDTHH:MM:SSZ) | Find trades that were opened after the datetime |
open_time_end | datetime (format YYYY-MM-DDTHH:MM:SSZ) | Find trades that were opened before the datetime |
close_time_start | datetime (format YYYY-MM-DDTHH:MM:SSZ) | Find trades that were closed after the datetime |
close_time_end | datetime (format YYYY-MM-DDTHH:MM:SSZ) | Find trades that were closed before the datetime |
Sign up to our newsletter to keep up-to-date.