REST
GET
/api/v1/orders/{clientId}Get Orders by ClientId
Retrieve all orders associated with a specific client identifier.
Auth:Bearer <api_key>
Tags:Orders
Request
cURL
curl -G https://publicapi.sandbox.hercle.financial/api/v1/orders/{clientId} \
-H "Authorization: Bearer eyJhb..." \
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| clientId | string | Yes | Unique client identifier to filter orders Example: 123e4567-e89b-12d3-a456-426614174000 |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token for authentication |
Response
Success Response Schema
Orders retrieved successfully
| Field | Type | Description |
|---|---|---|
orderId | string | Unique identifier for the order |
clientId | string | Client identifier associated with the order |
userId | string | User identifier who placed the order |
instrument | string | Trading instrument (e.g., BTCUSD) |
side | string | Order side Allowed values: buysell |
orderType | number | Current type of the order 0→ Market1→ Fill or Kill |
price | number | Order price |
executedPrice | number | Actual execution price |
executedTimestamp | string | ISO 8601 timestamp of order execution |
quantity | number | Requested order quantity |
quantityFilled | number | Quantity that was filled |
orderStatus | number | Current status of the order 0→ Created1→ Executed2→ Cancelled3→ Pending |
cancellationReason | string | Reason for cancellation if applicable |
slippage | number | Maximum acceptable price slippage percentage |
timestamp | string | ISO 8601 timestamp of order creation |
Responses
Orders retrieved successfully
200 application/json
[
{
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"clientId": "client_001",
"userId": "user_001",
"instrument": "BTCUSD",
"side": "buy",
"orderType": 0,
"price": 50000,
"executedPrice": 49950,
"executedTimestamp": "2024-06-01T12:00:00Z",
"quantity": 0.1,
"quantityFilled": 0.1,
"orderStatus": 1,
"cancellationReason": "",
"slippage": 0.5,
"timestamp": "2024-06-01T11:59:59Z"
},
{
"orderId": "987e6543-e21b-12d3-a456-426614174001",
"clientId": "client_001",
"userId": "user_001",
"instrument": "ETHUSD",
"side": "sell",
"orderType": 0,
"price": 3000,
"executedPrice": 3010,
"executedTimestamp": "2024-06-02T14:30:00Z",
"quantity": 1.5,
"quantityFilled": 1.5,
"orderStatus": 1,
"cancellationReason": "",
"slippage": 0.5,
"timestamp": "2024-06-02T14:29:59Z"
}
]API Tester
Test this endpoint directly against the sandbox environment
Get your API key from Hercle Sandbox
Unique client identifier to filter orders
https://publicapi.sandbox.hercle.financial/api/v1/orders/{clientId}