GET v1/orders
GET /v1/orders
Endpoint where you can get all your orders.
For more information you can check our Authentication V1 article.
This endpoint can be used for more detailed information about orders.
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| X-PCK | {{X-PCK}} |
| X-Signature | {{X-Signature}} |
| X-Stamp | {{X-Stamp}} |
| X-Nonce | {{X-Nonce}} |
Query Parameters:
| Name | Type | Description | Required |
|---|---|---|---|
| pairSymbol | STRING | YES | |
| orderIdAfter | STRING | Includes orders with an id greater than or equal to the specified orderId. If this parameter is set, response is ordered by id otherwise it is ordered by createdAt. | Required if createdAtBefore is not set |
| type | STRING[] | -Buy -Sell | NO |
| status | STRING[] | -Untouched -Partial -Closed Format: {&status*}If not provided, orders with all three statuses (Untouched, Partial, Closed) are returned. | NO |
| createdAtBefore | DATETIME | Filters orders created on or before the specified date. | Required if orderIdAfter is not set |
| createdAtAfter | DATETIME | Selects orders created after a specified date. If not provided and createdAtBefore is not null, it defaults to including orders from the last 90 days, ensuring that the query does not retrieve orders older than 90 days from the current date. Date range can be maximum 90 days. If the value is greater than 90 days, the default date range is set to 90. | NO |
| page | INT | Default value 1 | NO |
| pageSize | INT | Must be between 1 and 50 Default value 50 | NO |
| order | STRING | -ASC -DESC Default value Desc | NO |
info
This API uses the Repeated Query Parameter convention (RFC 6570 exploded query parameters {&status*}).
Example:
?status=Untouched&status=Partial&status=Closed
info
Canceled orders are not returned by this endpoint. Omitting the status parameter returns orders in all queryable statuses (Untouched, Partial, Closed); requesting status=Canceled results in a validation error.
Response
- 200
- 400
[
{
"id": "12",
"accountId": "0280130e2bf44aba99fcf7d59153400d",
"pairSymbol": "BTCTRY",
"feePercentage": "0.0008474580000000",
"taxPercentage": "0.2000000000000000",
"initialAmount": "100.0000000000000000", //first order amount as numerator
"currentAmount": "0.0000000000000000", //left order amount as numerator
"matchedAmount": "100.0000000000000000", //matched order amount as numerator
"price": "13.5000000000000000",
"initialTotal": "1351.3728819600000000", //first order amount as denominator
"currentTotal": "0.0000000000000000", //left order amount as denominator
"matchedTotal": "1351.3728819600000000", //matched order amount as denominator
"method": "Limit", //Limit, Market
"type": "Buy", //Buy, Sell
"status": "Closed", //Untouched, Partial, Closed
"externalOrderId": "Hft-12",
"createdAt": "2024-02-02T09:22:43.498728",
"createdBy": "[email protected]"
}
]
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"accountId": [
"AccountId is required"
],
"pairSymbol": [
"PairSymbol is required",
"PairSymbol must be exist"
],
"orderIdAfter": [
"OrderIdAfter or CreatedAtBefore is required"
],
"createdAtBefore": [
"OrderIdAfter or CreatedAtBefore is required"
]
},
"traceId": "0HN280393QR1F:00000001"
}