API reference
Get multiple trades
GET | QUERY
https://api.tradesync.com/tradesReturn a paginated list of trades.
Last updated
Filters
All filters are optional. See Filtering and Pagination.
- idType: integer
- Trade ID; ignored when ids is suppliedAccepted values / limits: At least 1; up to 12 digits
- idsType: string
- Trade IDs; takes precedence over idAccepted values / limits: Comma-separated IDs; up to 10,000 entries; up to 12 digits per ID
- account_idType: integer
- Account ID; ignored when account_ids or filter_id is suppliedAccepted values / limits: At least 1; up to 12 digits
- account_idsType: string
- Account IDs; ignored when filter_id is suppliedAccepted values / limits: Comma-separated IDs; up to 10,000 entries; up to 12 digits per ID
- stateType: string
- Trade stateAccepted values / limits: open, closed
- open_time_startType: string
- Open time at or after this timeAccepted values / limits: UTC datetime (YYYY-MM-DDTHH:MM:SSZ)
- open_time_endType: string
- Open time at or before this time. Must be later than open_time_start when both are supplied.Accepted values / limits: UTC datetime (YYYY-MM-DDTHH:MM:SSZ)
- close_time_startType: string
- Close time at or after this time. Cannot be used with state set to open.Accepted values / limits: UTC datetime (YYYY-MM-DDTHH:MM:SSZ)
- close_time_endType: string
- Close time at or before this time. Cannot be used with state set to open. Must be later than close_time_start when both are supplied.Accepted values / limits: UTC datetime (YYYY-MM-DDTHH:MM:SSZ)
- updated_at_startType: string
- Update time at or after this timeAccepted values / limits: UTC datetime (YYYY-MM-DDTHH:MM:SSZ)
- updated_at_endType: string
- Update time at or before this timeAccepted values / limits: UTC datetime (YYYY-MM-DDTHH:MM:SSZ)
- filter_idType: integer
- Saved accounts filter belonging to the user; overrides account_id and account_idsAccepted values / limits: —
Response example
See response field definitions for field types and conditional fields.
{
"result": "success",
"status": 200,
"meta": {
"count": 2,
"limit": 1000,
"order": "desc",
"last_id": 1212512280
},
"data": [
{
"id": 1212851507,
"created_at": "2025-04-25T14:17:24Z",
"updated_at": "2025-04-25T14:45:14Z",
"state": "open",
"account_id": 1242495,
"ticket": 411112093,
"type": "buy",
"symbol": "EURUSD",
"lots": 1,
"open_time": "2025-04-24T17:38:22Z",
"open_price": 1.13553,
"stop_loss": 0,
"take_profit": 0,
"close_time": null,
"close_price": 1.13726,
"commission": 0,
"swap": -7.1,
"profit": 173,
"comment": "",
"magic": 0,
"digits": 5,
"tick_value": 1,
"tick_size": 0.00001,
"alt_tick_value": 1,
"profit_calc_mode": "forex"
},
{
"id": 1212512280,
"created_at": "2025-04-25T09:55:33Z",
"updated_at": "2025-04-25T14:36:32Z",
"state": "open",
"account_id": 1241451,
"ticket": 411142322,
"type": "buy",
"symbol": "GBPUSD",
"lots": 0.01,
"open_time": "2025-04-25T11:55:33Z",
"open_price": 1.33009,
"stop_loss": 0,
"take_profit": 0,
"close_time": null,
"close_price": 1.3311,
"commission": 0,
"swap": 0,
"profit": 1.01,
"comment": "",
"magic": 1212512279,
"digits": 5,
"tick_value": 1,
"tick_size": 0.00001,
"alt_tick_value": 1,
"profit_calc_mode": "forex"
}
]
}
Errors
| Code | HTTP status | Condition |
|---|---|---|
| filter_does_not_exist | 422 | The saved filter does not exist or does not belong to the user. |
| filter_wrong_type | 422 | The saved filter is not an accounts filter. |
See also common response codes.