MMTMMT Docs
REST API

Candles

Retrieve historical OHLCVT candle data for a trading pair on an exchange.

Retrieves historical OHLCVT (Open, High, Low, Close, Volume, Trades) candle data for a trading pair on a single exchange.

Authentication

API key via X-API-Key header.

Endpoint

GET /api/v1/candles

Parameters

NameInRequiredDescription
exchangequeryYesExchange ID (e.g., binancef, bybitf)
symbolqueryYesTrading pair with slash separator (e.g., btc/usd, eth/usd)
tfqueryYesTimeframe (e.g., 1m, 5m, 1h, 1d)
fromqueryYesStart timestamp (Unix seconds, inclusive)
toqueryYesEnd timestamp (Unix seconds, exclusive)

Note: This endpoint does not support aggregated exchanges. Use a single exchange ID.

Rate Limits

  • Cost multiplier: 1x
  • Max points: 100,000 per request
  • Formula: ceil(points / 1000) * multiplier

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
    },
    {
      "t": 1704067260,
      "o": 42100.00,
      "h": 42200.00,
      "l": 42050.00,
      "c": 42180.00,
      "vb": 1200000.00,
      "vs": 1100000.00,
      "tb": 980,
      "ts": 920
    }
  ],
  "exchange": "binancef",
  "symbol": "btc/usd",
  "tf": "1m",
  "from": 1704067200,
  "to": 1704153600,
  "points": 1440
}

Types

Response Type: OHLCVT

{"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

See Types for full details.

Errors

CodeHTTPDescription
INVALID_API_KEY401Missing or invalid API key
INVALID_PARAMS400Invalid or missing query parameters
INVALID_EXCHANGE400Unknown or unsupported exchange ID
INVALID_TIMEFRAME400Invalid timeframe format or outside allowed range
MAX_POINTS_EXCEEDED400Request exceeds 100,000 datapoints
TIER_RESTRICTED403Data outside tier's allowed historical range
RATE_LIMITED429Rate limit exceeded
TIMEOUT504Query exceeded 30 second timeout
INTERNAL_ERROR500Internal server error

On this page