REST
GET
/api/v1/price/{pair}/{size}Get Pair Price
Gets the last pair price based on size.
Auth:Bearer <api_key>
Tags:Pairs
Request
cURL
curl -G https://publicapi.sandbox.hercle.financial/api/v1/price/{pair}/{size} \
-H "Authorization: Bearer eyJhb..." \
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pair | string | Yes | Trading pair in the format BASE-QUOTE (e.g., BTCUSDT) Example: BTCUSDT |
| size | number | Yes | Trade size to get the price for Example: 20 |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token for authentication |
Response
Success Response Schema
Calculated trade size
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the price quote |
size | number | Trade size in base asset |
pair | string | Trading pair (e.g., BTCUSDT) |
buyPrice | number | Current buy price |
sellPrice | number | Current sell price |
markPrice | number | Mark price (mid-market price) |
timeStamp | string | ISO 8601 timestamp of the quote |
Responses
Calculated trade size
200 application/json
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"size": 20,
"pair": "BTCUSDT",
"buyPrice": 50000,
"sellPrice": 49950,
"markPrice": 49975,
"timeStamp": "2023-10-05T14:48:00.000Z"
}API Tester
Test this endpoint directly against the sandbox environment
Get your API key from Hercle Sandbox
Trading pair in the format BASE-QUOTE (e.g., BTCUSDT)
Trade size to get the price for
https://publicapi.sandbox.hercle.financial/api/v1/price/{pair}/{size}