MMTMMT Docs
REST API

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/v1

Available 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-here

Response Format

Responses are JSON by default. You can request CBOR encoding with either:

  • Accept: application/cbor
  • ?format=cbor (query param takes precedence over Accept)

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
}

REST responses support compression to reduce bandwidth and speed up large payloads.

  • Send Accept-Encoding: gzip (or Accept-Encoding: zstd, gzip) to enable compression.
  • Most HTTP clients automatically decompress responses. If you override headers, keep Accept-Encoding enabled.

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 return INVALID_EXCHANGE (HTTP 400). /candles, /orderbook, /stop_heatmap, /tp_heatmap, and /liquidation_heatmap require a single exchange. The three custom heatmaps are available only for hyperliquid and hyperliquid-xyz.

Symbol

Warning: Use Unified Symbols Use our unified symbols from the /markets endpoint, 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:

FormatMeaning
1m, 5m, 15m, 30mMinutes
1h, 4h, 12hHours
1dDay
1wWeek

Note: REST supports minute-and-higher timeframes (1m and up). Second-based timeframes are available on WebSocket subscriptions.

REST timeframe limits: minimum 1m, maximum 1M (1 month).

Time Range

  • from - Start timestamp (Unix seconds, inclusive)
  • to - End timestamp (Unix seconds, exclusive)

Available Endpoints

EndpointDescriptionMax PointsCost
/marketsList exchanges and symbols-1
/candlesOHLCVT candles100,0001x
/statsMarket statistics100,0001x
/oiOpen interest100,0001x
/vdVolume delta100,0001x
/volumesVolume profile20,0004x
/heatmap_sdHeatmap (standard)5,0005x
/heatmap_hdHeatmap (high density)4,00010x
/flat_heatmap_sdFlat heatmap (standard, recommended)5,0005x
/flat_heatmap_hdFlat heatmap (high density, recommended)4,00010x
/stop_heatmapStop heatmap (flat-only, Hyperliquid exchanges only)5,0005x
/tp_heatmapTake-profit heatmap (flat-only, Hyperliquid exchanges only)5,0005x
/liquidation_heatmapLiquidation heatmap (flat-only, Hyperliquid exchanges only)5,0005x
/orderbookOrderbook snapshot-1

Rate Limiting

See Rate Limits for details on weight calculation and tier limits.

On this page