MMTMMT Docs
Basics

Types

All data types used in REST and WebSocket API responses, including candles, heatmaps, trades, and envelope types.

All data types used in API responses.

JSON & CBOR Use Identical Field Names: All types use the same field names in both JSON and CBOR formats. The only difference is the encoding—CBOR is more compact on the wire (~30-40% smaller).

JSON: {"t": 1704067200, "o": 42150.5, "h": 42200.0, ...}
CBOR: {t: 1704067200, o: 42150.5, h: 42200.0, ...}  (binary encoded)

Data Types

Candle (OHLCVT)

OHLCVT candle with volume and trade counts.

{"t": 1704067200, "o": 42000.5, "h": 42150.0, "l": 41950.0, "c": 42100.0, "vb": 1500000.0, "vs": 1400000.0, "tb": 1250, "ts": 1180}
FieldTypeDescription
tint64Unix timestamp (seconds)
o, h, l, cfloat64Open, high, low, close price
vb, vsfloat64Buy/sell volume (USD)
tb, tsint64Buy/sell trade count

OI / VD Candle (OHLC)

Simple OHLC candle for Open Interest and Volume Delta.

{"t": 1704067200, "o": 5000000000, "h": 5100000000, "l": 4950000000, "c": 5050000000, "n": 60}
FieldTypeDescription
tint64Unix timestamp (seconds)
o, h, l, cfloat64Open, high, low, close value
nint64Sample count

Stat

Market statistics including funding, liquidations, depth, and TPS.

{"t": 1704067200, "mp": 42050.0, "lp": 42100.0, "fr": 0.0001, "lb": 50000.0, "ls": 75000.0, "tlb": 15, "tls": 22, "vb": 1500000.0, "vs": 1400000.0, "tb": 1250, "ts": 1180, "sk": [0.15, 0.22], "as": [500000, 1500000], "bs": [600000, 1800000], "mxt": 250, "mnt": 10, "avt": 85.5, "it": 95}
FieldTypeDescription
tint64Unix timestamp (seconds)
mp, lpfloat64Mark price, last price (mp can be 0 when mark price is unavailable)
frfloat64Funding rate
lb, lsfloat64Liquidation buy/sell volume (USD)
tlb, tlsint64Liquidation buy/sell count
vb, vsfloat64Buy/sell volume (USD)
tb, tsint64Buy/sell trade count
sk[]float64Orderbook skews at depth levels
as, bs[]float64Ask/bid depth sums (USD) at levels
mxt, mntint64Max/min TPS in period
avtfloat64Avg TPS in period
itint64Instantaneous TPS

Volume

Volume profile showing buy/sell at price levels.

{"t": 1704067200, "p": [41900, 41950, 42000], "b": [50000, 75000, 120000], "s": [45000, 60000, 100000], "pg": 50}
FieldTypeDescription
tint64Unix timestamp (seconds)
p[]float64Price levels
b, s[]float64Buy/sell volumes at each price (USD)
pgfloat64Price grouping/bucket size

Heatmap

Orderbook heatmap with explicit price array. Used by WebSocket heatmap_sd and heatmap_hd channels. Flat heatmap channels (flat_heatmap_sd, flat_heatmap_hd, stop_heatmap, tp_heatmap, liquidation_heatmap) and all REST heatmap endpoints return the FlatHeatmap format.

{"t": 1704067200, "pg": 10, "p": [41500, 41510, 41520], "s": [100000, 250000, 500000], "si": 50, "lp": 42050.0, "minp": 41500.0, "maxp": 42500.0, "mins": 10000, "maxs": 1000000}
FieldTypeDescription
tint64Unix timestamp (seconds)
pgfloat64Price grouping/bucket size
p[]float64Price levels
s[]float64Size values at each price
siint64Split index (divides bids/asks)
lpfloat64Last traded price
minp, maxpfloat64Min/max price in range
mins, maxsfloat64Min/max size value

FlatHeatmap

Orderbook heatmap with dense size array (no explicit prices).

{"t": 1704067200, "pg": 10, "s": [100000, 250000, 500000], "lp": 42050.0, "si": 50, "minp": 41500.0, "maxp": 42500.0, "mins": 10000, "maxs": 1000000}
FieldTypeDescription
tint64Unix timestamp (seconds)
pgfloat64Price grouping/bucket size
s[]float64Size values (dense array)
lpfloat64Last traded price
siint64Split index (divides bids/asks)
minp, maxpfloat64Min/max price in range
mins, maxsfloat64Min/max size value

Price at index i = minp + (i * pg)


Trade

Real-time trade (WebSocket only).

{"id": "3065401760", "t": 1704067200123, "p": 42050.0, "q": 0.5, "b": true}
FieldTypeDescription
idstringTrade ID from exchange
tint64Unix timestamp (milliseconds)
pfloat64Price
qfloat64Quantity
bboolSide (true = buy)

Liquidation

A single liquidation event.

{"t": 1704067200, "p": 42050.0, "q": 0.5, "s": "buy"}
FieldTypeDescription
tint64Unix timestamp (seconds)
pfloat64Price
qfloat64Quantity
sstringSide ("buy" or "sell")

Market

Market overview data.

{"t": 1704067200, "p": 42050.0, "p24": 41500.0, "pc": 1.33, "vb24": 1500000.0, "vs24": 1400000.0, "tb24": 1250, "ts24": 1180, "mc": 820000000000, "fdv": 880000000000, "cs": 19500000, "ts": 21000000, "ms": 21000000}
FieldTypeDescription
tint64Unix timestamp (seconds)
pfloat64Current price
p24float64Price 24h ago
pcfloat64Price change 24h
vb24, vs24float64Buy/sell volume 24h (USD)
tb24, ts24float64Buy/sell trade count 24h
mcfloat64Market cap
fdvfloat64Fully diluted valuation
csfloat64Circulating supply
tsfloat64Total supply
msfloat64Max supply

Orderbook

Orderbook snapshot/update (REST and WebSocket).

{"t": 1704067200123, "a": [[42001, 1.2], [42002, 1.8]], "b": [[42000, 1.5], [41999, 2.0]], "lp": 42050.0, "snapshot": true, "seq": 123456}
FieldTypeDescription
tint64Unix timestamp (milliseconds)
a[][2]float64Asks as [price, size] pairs (ascending)
b[][2]float64Bids as [price, size] pairs (descending)
lpfloat64Last traded price
snapshotboolFull snapshot flag
seqint64Sequence number

Envelope Types

WSDataMessage

WebSocket data message envelope (realtime streams).

{"type": "data", "channel": "candles", "exchange": "binancef", "symbol": "btc/usd", "tf": "1m", "data": {...}, "id": "candles.binancef.btc/usd.60"}
FieldTypeDescription
typestringAlways "data"
channelstringChannel name (candles, stats, trades, etc.)
exchangestringExchange ID
symbolstringTrading pair
tfstringTimeframe (if applicable)
dataanyThe data payload (type depends on channel)
idstringSubscription identifier

RangeResponse

REST API response envelope.

{"data": [...], "exchange": "binancef", "symbol": "btc/usd", "tf": "1m", "from": 1704067200, "to": 1704153600, "points": 1440}
FieldTypeDescription
dataany[]Array of data points
exchangestringExchange ID
symbolstringTrading pair
tfstringTimeframe
from, toint64Unix timestamps (seconds)
pointsint64Number of data points

ErrorResponse

Error response format.

{"error": {"code": "INVALID_PARAMS", "message": "Invalid request parameters", "details": {"field": "from"}}}
FieldTypeDescription
error.codestringError code
error.messagestringHuman-readable message
error.detailsobjectAdditional details (optional)

WebSocket Control Messages

Connected

{"type": "connected", "tier": "pro", "max_subscriptions": 100, "format": "json"}

Subscribed / Unsubscribed

{"type": "subscribed", "id": "my-id", "channel": "candles", "exchange": "binancef", "symbol": "btc/usd", "tf": "1m"}

Disconnecting

{"type": "disconnecting", "reason": "backpressure"}

Reasons: backpressure, timeout, server_shutdown, normal

Pong

{"type": "pong"}

Subscriptions

{"type": "subscriptions", "count": 2, "max": 100, "subscriptions": [{"id": "candles.binancef.btc/usd.60", "channel": "candles", "exchange": "binancef", "symbol": "btc/usd", "tf": "1m"}]}

Reference Types

UsageResponse

{"limit": 10000, "remaining": 8500, "used": 1500, "reset": 1704067260, "window_seconds": 60}

limit, remaining, and used are dynamic values returned for your current key and plan.

FieldTypeDescription
limitint64Max weight per minute
remainingint64Remaining weight
usedint64Weight consumed
resetint64Window reset timestamp
window_secondsint64Window duration (60)

BucketGroupInfo

{"id": 3, "name": "1K-10K", "description": "$1,000 - $10,000"}
IDNameRange
1allAll trades
21-1K$1 - $1,000
31K-10K$1,000 - $10,000
410K-25K$10,000 - $25,000
525K-50K$25,000 - $50,000
650K-100K$50,000 - $100,000
7100K-250K$100,000 - $250,000
8250K-500K$250,000 - $500,000
9500K-1M$500,000 - $1,000,000
101M-5M$1,000,000 - $5,000,000
115M+$5,000,000+

On this page