MMTMMT Docs
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/stats

Parameters

ParameterTypeRequiredDescription
exchangestringYesExchange ID (e.g., binancef, bybitf). Aggregated format: colon-separated, unique, alphabetically ordered IDs (e.g., binancef:bybitf). Invalid aggregate strings return INVALID_EXCHANGE.
symbolstringYesTrading pair with slash separator (e.g., btc/usd)
tfstringYesTimeframe (e.g., 1m, 5m, 1h, 1d)
fromint64YesStart timestamp (Unix seconds, inclusive)
toint64YesEnd timestamp (Unix seconds, exclusive)

Note: Aggregated exchange requests are supported. For aggregated stats, mp (mark price) and fr (funding rate) are returned as 0.

Rate Limits

MetricValue
Cost Multiplier1x
Max Points100,000

Weight formula:

base_points = (to - from) / tf_seconds
weight = ceil(base_points / 1000) × 1

Response

{
  "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, ...}
FieldTypeDescription
tint64Unix timestamp (seconds)
mp, lpfloat64Mark price, last price (mp can be 0 when mark price is unavailable or for aggregated exchange requests)
frfloat64Funding rate (0 for aggregated exchange requests)
lb, lsfloat64Liquidation buy/sell volume
tlb, tlsint64Liquidation buy/sell count
vb, vsfloat64Buy/sell volume
tb, tsint64Buy/sell trade count
sk, as, bs[]float64Skews, ask/bid depth sums
mxt, mntint64Max/min TPS in period
avtfloat64Avg TPS in period
itint64Instantaneous 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

CodeHTTPDescription
INVALID_API_KEY401Missing or invalid API key
INVALID_PARAMS400Missing or invalid parameters
INVALID_EXCHANGE400Unknown exchange ID, duplicate exchange in aggregate string, or non-alphabetical aggregate ordering
INVALID_SYMBOL400Unknown trading symbol
INVALID_TIMEFRAME400Invalid timeframe format or outside allowed range
TIER_RESTRICTED403Data outside tier's allowed range
MAX_POINTS_EXCEEDED400Request exceeds 100,000 points
RATE_LIMITED429Rate limit exceeded
TIMEOUT504Query 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"

On this page