Hercle
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

NameTypeRequiredDescription
clientIdstringYesUnique client identifier to filter orders
Example: 123e4567-e89b-12d3-a456-426614174000

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer token for authentication

Response

Success Response Schema

FieldTypeDescription
orderIdstringUnique identifier for the order
clientIdstringClient identifier associated with the order
userIdstringUser identifier who placed the order
instrumentstringTrading instrument (e.g., BTCUSD)
sidestring
Order side
Allowed values:
buy
sell
orderTypenumber
Current type of the order
0Market
1Fill or Kill
pricenumberOrder price
executedPricenumberActual execution price
executedTimestampstringISO 8601 timestamp of order execution
quantitynumberRequested order quantity
quantityFillednumberQuantity that was filled
orderStatusnumber
Current status of the order
0Created
1Executed
2Cancelled
3Pending
cancellationReasonstringReason for cancellation if applicable
slippagenumberMaximum acceptable price slippage percentage
timestampstringISO 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}