Skip to main content

Get Trades

API URL: POST https://userapi-demo.s2f.projectx.com/DataExport/trades

API Reference: /DataExport/trades

Description


Retrieves a list of all trades. Maximum request data range of 30 days.

Parameters


NameTypeDescriptionRequiredNullable
fromdatetimeRetrieves list of positions that have been created or updated after this time.truefalse
todatetimeRetrieves list of positions that have been created or updated before this time.truefalse

Example Usage


Example Request

{
"from": "2024-07-05T17:38:23.621Z",
"to": "2024-07-05T17:38:23.621Z"
}

Example Response

{
"data": [
{
"id": 8508,
"contractGroupId": "F.US.MES",
"contractGroupName": "/MES",
"contractId": "CON.F.US.MES.H25",
"contractName": "MESH5",
"tradeDay": "2025-01-15T06:00:00+00:00",
"createdAt": "2025-01-15T17:35:58.566225+00:00",
"tradeDuration": null,
"price": 5975.500000000,
"fees": 0.3700,
"action": 1,
"lots": 1,
"status": 1,
"pairedTradeId": null,
"pnl": 0.000000000,
"tradingAccountId": 213,
"orderId": 14117,
"enteredAt": "2025-01-15T17:35:58.566225+00:00",
"exitedAt": null,
"entryPrice": 5975.500000000,
"exitPrice": null,
"voided": false,
"orderCreationDisposition": 0
}
],
"success": true,
"errorMessage": "string"
}