REST API
Stats
Retrieve market statistics including funding rate, liquidations, orderbook depth, and TPS metrics.
Returns market statistics including funding rate, liquidations, orderbook depth, and TPS metrics.
Authentication
API key via X-API-Key header.
Endpoint
GET /api/v1/statsParameters
| 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) |
Note: Aggregated exchange requests are supported. For aggregated stats,
mp(mark price) andfr(funding rate) are returned as0.
Rate Limits
| Metric | Value |
|---|---|
| Cost Multiplier | 1x |
| Max Points | 100,000 |
Weight formula:
base_points = (to - from) / tf_seconds
weight = ceil(base_points / 1000) × 1Response
{
"data": [
{
"t": 1704067200,
"mp": 42050.00,
"lp": 42100.00,
"fr": 0.0001,
"lb": 50000.00,
"ls": 75000.00,
"tlb": 15,
"tls": 22,
"vb": 1500000.00,
"vs": 1400000.00,
"tb": 1250,
"ts": 1180,
"sk": [0.15, 0.22, 0.18, 0.12, 0.08, 0.05, 0.02],
"as": [500000, 1500000, 3000000, 5000000, 10000000, 20000000, 40000000],
"bs": [600000, 1800000, 3500000, 5500000, 11000000, 22000000, 45000000],
"mxt": 250,
"mnt": 10,
"avt": 85.5,
"it": 95
}
],
"exchange": "binancef",
"symbol": "btc/usd",
"tf": "1m",
"from": 1704067200,
"to": 1704153600,
"points": 1440
}Response Type: Stat
{"t": 1704067200, "mp": 42050.0, "lp": 42100.0, "fr": 0.0001, ...}| Field | Type | Description |
|---|---|---|
t | int64 | Unix timestamp (seconds) |
mp, lp | float64 | Mark price, last price (mp can be 0 when mark price is unavailable or for aggregated exchange requests) |
fr | float64 | Funding rate (0 for aggregated exchange requests) |
lb, ls | float64 | Liquidation buy/sell volume |
tlb, tls | int64 | Liquidation buy/sell count |
vb, vs | float64 | Buy/sell volume |
tb, ts | int64 | Buy/sell trade count |
sk, as, bs | []float64 | Skews, ask/bid depth sums |
mxt, mnt | int64 | Max/min TPS in period |
avt | float64 | Avg TPS in period |
it | int64 | Instantaneous TPS |
Depth levels (indices 0-6): 0.1%, 0.25%, 0.5%, 1%, 2.5%, 5%, 10% from mark price.
Skew values range from -1 (bid dominated) to 1 (ask dominated).
See Types for full details.
Errors
| Code | HTTP | Description |
|---|---|---|
INVALID_API_KEY | 401 | Missing or invalid API key |
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 |
TIER_RESTRICTED | 403 | Data outside tier's allowed range |
MAX_POINTS_EXCEEDED | 400 | Request exceeds 100,000 points |
RATE_LIMITED | 429 | Rate limit exceeded |
TIMEOUT | 504 | Query exceeded 30s timeout |
See Errors for detailed error response formats.
Examples
Request
curl "https://eu-central-1.mmt.gg/api/v1/stats?exchange=binancef&symbol=btc/usd&tf=1m&from=1704067200&to=1704153600" \
-H "X-API-Key: your-api-key"Aggregated Request
curl "https://eu-central-1.mmt.gg/api/v1/stats?exchange=binancef:bybitf&symbol=btc/usd&tf=1m&from=1704067200&to=1704153600" \
-H "X-API-Key: your-api-key"