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)
basestringBase asset of the instrument (e.g., BTC)
quotestringQuote asset of the instrument (e.g., USD)
sidestring
Order side
Allowed values:
buy
sell
orderTypenumber
Current type of the order
0→ Market
1→ Fill or Kill
pricenumberOrder price
executedPricenumber | nullActual execution price, or null
executedTimestampstring | nullISO 8601 timestamp of order execution, or null
quantitynumberRequested order quantity
quantityFillednumber | nullQuantity that was filled, or null
orderStatusnumber
Current status of the order
0→ Created
1→ Executed
2→ Cancelled
3→ Pending
cancellationReasonstring | nullReason for cancellation if applicable, or null
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",
    "base": "BTC",
    "quote": "USD",
    "side": "buy",
    "orderType": 0,
    "price": 50000,
    "executedPrice": 49950,
    "executedTimestamp": "2024-06-01T12:00:00Z",
    "quantity": 0.1,
    "quantityFilled": 0.1,
    "orderStatus": 1,
    "cancellationReason": null,
    "slippage": 0.5,
    "timestamp": "2024-06-01T11:59:59Z"
  },
  {
    "orderId": "987e6543-e21b-12d3-a456-426614174001",
    "clientId": "client_001",
    "userId": "user_001",
    "instrument": "ETHUSD",
    "base": "ETH",
    "quote": "USD",
    "side": "sell",
    "orderType": 0,
    "price": 3000,
    "executedPrice": 3010,
    "executedTimestamp": "2024-06-02T14:30:00Z",
    "quantity": 1.5,
    "quantityFilled": 1.5,
    "orderStatus": 1,
    "cancellationReason": null,
    "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}