Hercle
REST
GET/api/v1/orders/{startDate}/{endDate}/{page}/{pageSize}

Get Orders Paginated

Retrieve a paginated list of OTC orders filtered by date range. Maximum date range is 30 days.

Auth:Bearer <api_key>
Tags:Orders

Request

cURL
curl -G https://publicapi.sandbox.hercle.financial/api/v1/orders/{startDate}/{endDate}/{page}/{pageSize} \
  -H "Authorization: Bearer eyJhb..." \
  

Path Parameters

NameTypeRequiredDescription
startDatestringYesStart date for filtering orders (ISO 8601 format). Maximum range: 30 days from end date.
Example: 2024-01-01T00:00:00Z
endDatestringYesEnd date for filtering orders (ISO 8601 format). Maximum range: 30 days from start date.
Example: 2024-01-31T23:59:59Z
pagenumberYesPage number for pagination (starting from 0)
Example: 0
pageSizenumberYesNumber of items per page (min: 5, max: 50)
Example: 5

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

List of 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

Start date for filtering orders (ISO 8601 format). Maximum range: 30 days from end date.

End date for filtering orders (ISO 8601 format). Maximum range: 30 days from start date.

Page number for pagination (starting from 0)

Number of items per page (min: 5, max: 50)

https://publicapi.sandbox.hercle.financial/api/v1/orders/{startDate}/{endDate}/{page}/{pageSize}