REST API Overview
Overview of the REST API for accessing historical market data, including base URLs, authentication, response formats, and available endpoints.
The REST API provides access to historical market data.
Base URL
https://{region}.mmt.gg/api/v1Available Regions:
eu-central-1.mmt.gg(Frankfurt)
Authentication
All requests require an API key via the X-API-Key header.
Server-side only: Treat the API key as a secret. Do not send requests directly from browser/mobile clients with this key. Route requests through your backend.
GET /api/v1/candles?exchange=binancef&symbol=btc/usd&tf=1m&from=1704067200&to=1704153600
X-API-Key: your-api-key-hereResponse Format
Responses are JSON by default. You can request CBOR encoding with either:
Accept: application/cbor?format=cbor(query param takes precedence overAccept)
CBOR notes:
- JSON and CBOR use identical field names - the only difference is the encoding
- CBOR is ~30-40% smaller on the wire
- See Types for all response type definitions
All data endpoints return:
{
"data": [...],
"exchange": "binancef",
"symbol": "btc/usd",
"tf": "1m",
"from": 1704067200,
"to": 1704153600,
"points": 1440
}Compression (Recommended)
REST responses support compression to reduce bandwidth and speed up large payloads.
- Send
Accept-Encoding: gzip(orAccept-Encoding: zstd, gzip) to enable compression. - Most HTTP clients automatically decompress responses. If you override headers, keep
Accept-Encodingenabled.
Example with curl:
curl -H "X-API-Key: YOUR_API_KEY" \
-H "Accept-Encoding: gzip" \
"https://eu-central-1.mmt.gg/api/v1/candles?exchange=binancef&symbol=btc/usd&tf=1m&from=1704067200&to=1704153600"Query Parameters
Exchange
Exchange ID as a query parameter. Examples: binancef, bybitf, coinbase, okxf.
Note: Many endpoints support aggregated exchanges using colon-separated IDs (for example:
exchange=binancef:bybitf). Aggregated exchange strings must be unique and alphabetically ordered. Invalid aggregate strings returnINVALID_EXCHANGE(HTTP 400)./candles,/orderbook,/stop_heatmap,/tp_heatmap, and/liquidation_heatmaprequire a single exchange. The three custom heatmaps are available only forhyperliquidandhyperliquid-xyz.
Symbol
Warning: Use Unified Symbols Use our unified symbols from the
/marketsendpoint, not exchange-native tickers. See Symbols for details.
Trading pair with slash separator: btc/usd, eth/usd, sol/usd.
Returned in the same format in responses: btc/usd.
Correct: /api/v1/candles?exchange=binancef&symbol=btc/usd (unified symbol)
Wrong: /api/v1/candles?exchange=binancef&symbol=BTCUSDT (exchange ticker)
Timeframe
Human-readable timeframe format:
| Format | Meaning |
|---|---|
1m, 5m, 15m, 30m | Minutes |
1h, 4h, 12h | Hours |
1d | Day |
1w | Week |
Note: REST supports minute-and-higher timeframes (
1mand up). Second-based timeframes are available on WebSocket subscriptions.REST timeframe limits: minimum
1m, maximum1M(1 month).
Time Range
from- Start timestamp (Unix seconds, inclusive)to- End timestamp (Unix seconds, exclusive)
Available Endpoints
| Endpoint | Description | Max Points | Cost |
|---|---|---|---|
| /markets | List exchanges and symbols | - | 1 |
| /candles | OHLCVT candles | 100,000 | 1x |
| /stats | Market statistics | 100,000 | 1x |
| /oi | Open interest | 100,000 | 1x |
| /vd | Volume delta | 100,000 | 1x |
| /volumes | Volume profile | 20,000 | 4x |
| /heatmap_sd | Heatmap (standard) | 5,000 | 5x |
| /heatmap_hd | Heatmap (high density) | 4,000 | 10x |
| /flat_heatmap_sd | Flat heatmap (standard, recommended) | 5,000 | 5x |
| /flat_heatmap_hd | Flat heatmap (high density, recommended) | 4,000 | 10x |
| /stop_heatmap | Stop heatmap (flat-only, Hyperliquid exchanges only) | 5,000 | 5x |
| /tp_heatmap | Take-profit heatmap (flat-only, Hyperliquid exchanges only) | 5,000 | 5x |
| /liquidation_heatmap | Liquidation heatmap (flat-only, Hyperliquid exchanges only) | 5,000 | 5x |
| /orderbook | Orderbook snapshot | - | 1 |
Rate Limiting
See Rate Limits for details on weight calculation and tier limits.