Get Orders
API URL: POST https://userapi-demo.s2f.projectx.com/DataExport/orders
API Reference: /DataExport/orders
Description
Retrieves a list of all open orders. If a time is provided in the request, only updated open/filled orders will be returned. If an order is no longer present in the response with time provided, it has either been cancelled or it has expired.
Parameters
Name | Type | Description | Required | Nullable |
---|---|---|---|---|
after | datetime | Retrieves list of orders that have been updated or created after this time. | false | true |
Example Usage
Example Request
- Request
- cURL
{
"after": "2024-06-13T02:19:13.180Z"
}
curl -X 'POST' \
'https://userapi-demo.s2f.projectx.com/orders' \
-H 'accept: text/plain' \
-H 'Content-Type: application/json' \
-d '{
"after": "2024-06-13T02:19:13.180Z"
}'
Example Response
- Success
{
"data": [
{
"id": 1,
"limitPrice": 0,
"stopPrice": 0,
"executedPrice": 5437.25,
"contractGroup": "/ES",
"contract": "ESM4",
"positionSize": 2,
"type": 1,
"status": 1,
"timestamp": "2024-06-13T02:48:04.387Z"
}
],
"success": true,
"errorMessage": "string"
}