REST API
Volume Delta
Retrieve cumulative volume delta (buy minus sell volume) as OHLC candles by trade size bucket.
Volume delta (VD) measures the cumulative difference between buy and sell volume over time by trade size bucket. Returns OHLC candles representing the VD value at each interval.
Authentication
API key via X-API-Key header.
Endpoint
GET /api/v1/vdParameters
| 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) |
from | int64 | Yes | Start timestamp (Unix seconds, inclusive) |
to | int64 | Yes | End timestamp (Unix seconds, exclusive) |
bucket | int | Yes | Trade size bucket (see below) |
Bucket Values
| Bucket | Trade Size Range |
|---|---|
| 1 | All trades |
| 2 | $1 - $1K |
| 3 | $1K - $10K |
| 4 | $10K - $25K |
| 5 | $25K - $50K |
| 6 | $50K - $100K |
| 7 | $100K - $250K |
| 8 | $250K - $500K |
| 9 | $500K - $1M |
| 10 | $1M - $5M |
| 11 | $5M+ |
Note: Basic plans can access bucket
1only. Pro plans can access buckets1-11.
Rate Limits
| Metric | Value |
|---|---|
| Cost multiplier | 1x |
| Max points | 100,000 |
Weight calculation for single-exchange requests:
base_points = (to - from) / tf_seconds
weight = ceil(base_points / 1000) × 1For multi-exchange aggregated requests, each exchange adds 20% to the base cost:
weight = ceil(base_points / 1000) × 1 × (1 + 0.2 × num_exchanges)For example, 5 exchanges = 2x cost, 10 exchanges = 3x cost.
Response
{
"data": [
{
"t": 1704067200,
"o": 150000.00,
"h": 250000.00,
"l": 100000.00,
"c": 200000.00,
"n": 60
},
{
"t": 1704067260,
"o": 200000.00,
"h": 300000.00,
"l": 180000.00,
"c": 275000.00,
"n": 60
}
],
"exchange": "binancef",
"symbol": "btc/usd",
"tf": "1m",
"from": 1704067200,
"to": 1704067320,
"points": 2
}Response Type: OHLC
{"t": 1704067200, "o": 150000.00, "h": 250000.00, "l": 100000.00, "c": 200000.00, "n": 60}| Field | Type | Description |
|---|---|---|
t | int64 | Unix timestamp (seconds) |
o, h, l, c | float64 | Open, high, low, close value |
n | int64 | Sample count |
See Types for full details.
Errors
| Code | HTTP | Description |
|---|---|---|
INVALID_API_KEY | 401 | Missing or invalid API key |
INVALID_PARAMS | 400 | General parameter validation failure |
INVALID_EXCHANGE | 400 | Unknown/unsupported exchange ID, duplicate exchange in aggregate string, or non-alphabetical aggregate ordering |
INVALID_SYMBOL | 400 | Unknown or unsupported trading symbol |
INVALID_TIMEFRAME | 400 | Invalid timeframe format or outside allowed range |
INVALID_BUCKET | 400 | Invalid or missing bucket parameter |
TIER_RESTRICTED | 403 | Request outside tier's allowed access |
AGG_NOT_ALLOWED | 403 | Multi-exchange aggregation not allowed on tier |
MAX_POINTS_EXCEEDED | 400 | Request exceeds maximum datapoints |
RATE_LIMITED | 429 | Rate limit exceeded |
TIMEOUT | 504 | Query exceeded 30 second timeout |
Example Error
{
"error": {
"code": "INVALID_BUCKET",
"message": "Invalid or restricted bucket group",
"details": {
"bucket": "15",
"valid_buckets": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
"bucket_descriptions": {
"1": "all", "2": "1-1K", "3": "1K-10K", "4": "10K-25K",
"5": "25K-50K", "6": "50K-100K", "7": "100K-250K", "8": "250K-500K",
"9": "500K-1M", "10": "1M-5M", "11": "5M+"
}
}
}
}Example Request
curl -X GET "https://eu-central-1.mmt.gg/api/v1/vd?exchange=binancef&symbol=btc/usd&tf=1m&from=1704067200&to=1704153600&bucket=1" \
-H "X-API-Key: your-api-key"