Quickstart
Get your first API response in minutes.
Get your first API response in minutes.
Prerequisites
- An MMT API key (get one from the dashboard)
- A tool to make HTTP requests (curl, Postman, or any HTTP client)
Use API keys only on your backend
MMT API keys are secret credentials. Do not put them in browser JavaScript, mobile apps, or other public clients. Call MMT from your backend, then return only the data your client needs.
Your First Request
Fetch the last hour of 1-minute candles for BTC/USD on Binance Futures.
Unified Symbols
Use btc/usd (our unified format), not BTCUSDT (exchange ticker). See Symbols for details.
curl -H "X-API-Key: YOUR_API_KEY" \
"https://eu-central-1.mmt.gg/api/v1/candles?exchange=binancef&symbol=btc/usd&tf=1m&from=$(date -v-1H +%s)&to=$(date +%s)"Response:
{
"data": [
{
"t": 1704067200,
"o": 42000.50,
"h": 42150.00,
"l": 41950.00,
"c": 42100.00,
"vb": 1500000.00,
"vs": 1400000.00,
"tb": 1250,
"ts": 1180
}
],
"exchange": "binancef",
"symbol": "btc/usd",
"tf": "1m",
"from": 1704063600,
"to": 1704067200,
"points": 60
}Understanding the Response
| Field | Description |
|---|---|
data | Array of candles |
t | Candle timestamp (Unix seconds) |
o, h, l, c | Open, high, low, close prices |
vb, vs | Buy and sell volume (USD) |
tb, ts | Buy and sell trade counts |
More Examples
Get market statistics
curl -H "X-API-Key: YOUR_API_KEY" \
"https://eu-central-1.mmt.gg/api/v1/stats?exchange=binancef&symbol=btc/usd&tf=1m&from=1704067200&to=1704153600"Get orderbook snapshot
curl -H "X-API-Key: YOUR_API_KEY" \
"https://eu-central-1.mmt.gg/api/v1/orderbook?exchange=binancef&symbol=btc/usd&levels=1000"List available markets
curl -H "X-API-Key: YOUR_API_KEY" \
"https://eu-central-1.mmt.gg/api/v1/markets"Real-Time Data
From your backend service, connect to WebSocket for live updates:
import WebSocket from 'ws';
const ws = new WebSocket('wss://eu-central-1.mmt.gg/api/v1/ws?api_key=YOUR_API_KEY');
ws.on('open', () => {
ws.send(JSON.stringify({
type: 'subscribe',
channel: 'candles',
exchange: 'binancef',
symbol: 'btc/usd',
tf: '1m'
}));
});
ws.on('message', (data, isBinary) => {
if (isBinary) return; // JSON format should not be binary
const msg = JSON.parse(data.toString());
console.log(msg);
});For CBOR, connect with ?format=cbor and decode incoming binary payloads with a CBOR decoder.
Next Steps
- Authentication - Learn about API keys and access levels
- Rate Limits - Understand usage limits
- REST API - Explore all endpoints
- WebSocket API - Real-time streaming guide