REST API
Volume Profile
Retrieve volume profile data showing buy and sell volumes distributed across price levels.
Returns volume profile data showing buy and sell volumes distributed across price levels for a given time range. Volume profiles visualize where trading activity occurred at different price points.
Authentication
API key via X-API-Key header.
Endpoint
GET /api/v1/volumesExample
GET /api/v1/volumes?exchange=binancef&symbol=btc/usd&tf=1m&from=1704067200&to=1704153600Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
exchange | string | Yes | Exchange ID (e.g., binancef, bybitf). Aggregated format: colon-separated, unique, alphabetically ordered IDs (e.g., binancef:bybitf). Invalid aggregate strings return INVALID_EXCHANGE. |
symbol | string | Yes | Trading pair with slash separator (e.g., btc/usd) |
tf | string | Yes | Timeframe (e.g., 1m, 5m, 1h, 1d) |
from | int64 | Yes | Start timestamp (Unix seconds, inclusive) |
to | int64 | Yes | End timestamp (Unix seconds, exclusive) |
Rate Limits
| Property | Value |
|---|---|
| Cost Multiplier | 4x |
| Max Points | 20,000 |
Weight calculation for single-exchange requests:
base_points = (to - from) / tf_seconds
weight = ceil(base_points / 1000) × 4For multi-exchange aggregated requests, each exchange adds 20% to the base cost:
weight = ceil(base_points / 1000) × 4 × (1 + 0.2 × num_exchanges)For example, 5 exchanges = 2x cost, 10 exchanges = 3x cost.
Response
{
"data": [
{
"t": 1704067200,
"p": [41900, 41950, 42000, 42050, 42100],
"b": [50000, 75000, 120000, 80000, 45000],
"s": [45000, 60000, 100000, 90000, 55000],
"pg": 50
},
{
"t": 1704067260,
"p": [41950, 42000, 42050, 42100, 42150],
"b": [60000, 85000, 110000, 70000, 40000],
"s": [55000, 70000, 95000, 85000, 50000],
"pg": 50
}
],
"exchange": "binancef",
"symbol": "btc/usd",
"tf": "1m",
"from": 1704067200,
"to": 1704153600,
"points": 1440
}Types
Response Type: Volume
{"t": 1704067200, "p": [41900, 41950, 42000], "b": [50000, 75000, 120000], "s": [45000, 60000, 100000], "pg": 50}| Field | Type | Description |
|---|---|---|
t | int64 | Unix timestamp (seconds) |
p | []float64 | Price levels |
b, s | []float64 | Buy/sell volumes at each price (USD) |
pg | float64 | Price grouping/bucket size |
See Types for full details.
Errors
Validation Errors
| Code | HTTP | Description |
|---|---|---|
INVALID_PARAMS | 400 | Missing or invalid parameters |
INVALID_EXCHANGE | 400 | Unknown exchange ID, duplicate exchange in aggregate string, or non-alphabetical aggregate ordering |
INVALID_SYMBOL | 400 | Unknown trading symbol |
INVALID_TIMEFRAME | 400 | Invalid timeframe format or outside allowed range |
{
"error": {
"code": "INVALID_PARAMS",
"message": "Invalid request parameters",
"details": {
"message": "from and to are required"
}
}
}Authentication Errors
| Code | HTTP | Description |
|---|---|---|
INVALID_API_KEY | 401 | Missing or invalid API key |
Tier Restriction Errors
| Code | HTTP | Description |
|---|---|---|
TIER_RESTRICTED | 403 | Request outside tier's allowed history |
AGG_NOT_ALLOWED | 403 | Multi-exchange aggregation not allowed on tier |
MAX_POINTS_EXCEEDED | 400 | Request exceeds 20,000 point limit |
{
"error": {
"code": "MAX_POINTS_EXCEEDED",
"message": "Request exceeds max datapoints for stream",
"details": {
"requested": 25000,
"max": 20000
}
}
}Rate Limit Errors
| Code | HTTP | Description |
|---|---|---|
RATE_LIMITED | 429 | Rate limit exceeded |
Server Errors
| Code | HTTP | Description |
|---|---|---|
TIMEOUT | 504 | Query exceeded 30 second timeout |
INTERNAL_ERROR | 500 | Internal server error |