MMTMMT Docs
REST API

Volume Delta

Retrieve cumulative volume delta (buy minus sell volume) as OHLC candles by trade size bucket.

Volume delta (VD) measures the cumulative difference between buy and sell volume over time by trade size bucket. Returns OHLC candles representing the VD value at each interval.

Authentication

API key via X-API-Key header.

Endpoint

GET /api/v1/vd

Parameters

ParameterTypeRequiredDescription
exchangestringYesExchange ID (e.g., binancef, bybitf). Aggregated format: colon-separated, unique, alphabetically ordered IDs (e.g., binancef:bybitf). Invalid aggregate strings return INVALID_EXCHANGE.
symbolstringYesTrading pair with slash separator (e.g., btc/usd)
tfstringYesTimeframe (e.g., 1m, 5m, 1h)
fromint64YesStart timestamp (Unix seconds, inclusive)
toint64YesEnd timestamp (Unix seconds, exclusive)
bucketintYesTrade size bucket (see below)

Bucket Values

BucketTrade Size Range
1All trades
2$1 - $1K
3$1K - $10K
4$10K - $25K
5$25K - $50K
6$50K - $100K
7$100K - $250K
8$250K - $500K
9$500K - $1M
10$1M - $5M
11$5M+

Note: Basic plans can access bucket 1 only. Pro plans can access buckets 1-11.

Rate Limits

MetricValue
Cost multiplier1x
Max points100,000

Weight calculation for single-exchange requests:

base_points = (to - from) / tf_seconds
weight = ceil(base_points / 1000) × 1

For multi-exchange aggregated requests, each exchange adds 20% to the base cost:

weight = ceil(base_points / 1000) × 1 × (1 + 0.2 × num_exchanges)

For example, 5 exchanges = 2x cost, 10 exchanges = 3x cost.

Response

{
  "data": [
    {
      "t": 1704067200,
      "o": 150000.00,
      "h": 250000.00,
      "l": 100000.00,
      "c": 200000.00,
      "n": 60
    },
    {
      "t": 1704067260,
      "o": 200000.00,
      "h": 300000.00,
      "l": 180000.00,
      "c": 275000.00,
      "n": 60
    }
  ],
  "exchange": "binancef",
  "symbol": "btc/usd",
  "tf": "1m",
  "from": 1704067200,
  "to": 1704067320,
  "points": 2
}

Response Type: OHLC

{"t": 1704067200, "o": 150000.00, "h": 250000.00, "l": 100000.00, "c": 200000.00, "n": 60}
FieldTypeDescription
tint64Unix timestamp (seconds)
o, h, l, cfloat64Open, high, low, close value
nint64Sample count

See Types for full details.

Errors

CodeHTTPDescription
INVALID_API_KEY401Missing or invalid API key
INVALID_PARAMS400General parameter validation failure
INVALID_EXCHANGE400Unknown/unsupported exchange ID, duplicate exchange in aggregate string, or non-alphabetical aggregate ordering
INVALID_SYMBOL400Unknown or unsupported trading symbol
INVALID_TIMEFRAME400Invalid timeframe format or outside allowed range
INVALID_BUCKET400Invalid or missing bucket parameter
TIER_RESTRICTED403Request outside tier's allowed access
AGG_NOT_ALLOWED403Multi-exchange aggregation not allowed on tier
MAX_POINTS_EXCEEDED400Request exceeds maximum datapoints
RATE_LIMITED429Rate limit exceeded
TIMEOUT504Query exceeded 30 second timeout

Example Error

{
  "error": {
    "code": "INVALID_BUCKET",
    "message": "Invalid or restricted bucket group",
    "details": {
      "bucket": "15",
      "valid_buckets": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
      "bucket_descriptions": {
        "1": "all", "2": "1-1K", "3": "1K-10K", "4": "10K-25K",
        "5": "25K-50K", "6": "50K-100K", "7": "100K-250K", "8": "250K-500K",
        "9": "500K-1M", "10": "1M-5M", "11": "5M+"
      }
    }
  }
}

Example Request

curl -X GET "https://eu-central-1.mmt.gg/api/v1/vd?exchange=binancef&symbol=btc/usd&tf=1m&from=1704067200&to=1704153600&bucket=1" \
  -H "X-API-Key: your-api-key"

On this page