Trades

Aggregate trade volume/pressure metrics for a contract window

Returns aggregated volume and buy-pressure metrics for a (provider, contract_id) over a trailing window, computed from the same deduplicated trade data as /v1/trades.

Two query shapes depending on provider, because the platform cannot generically infer which side of a market is "Yes":

  • Kalshi: outcome_0 is the side where outcome or token_id (case-insensitive) equals "yes", outcome_1 is "no".
  • All other providers: volumes are grouped by token_id and the top 2 tokens by volume are reported as outcome_0/outcome_1 — a volume ranking, not a guaranteed Yes/No mapping.

USD volume is always size * price / 100 (price is cents 0–100 for every provider). outcome_0_volume_share_pct defaults to 50.0 when both outcome volumes are zero. coverage_pct measures how much of the requested window is actually backed by data and is 0 when no trades are found in the window.

Rate-limit cost (LIGHT bucket): flat 1 unit per request.

Caching: responses are cached for 10s per replica (with singleflight coalescing) to absorb duplicate concurrent requests. Cache-Control: private, max-age=5, no ETag — this route never returns 304.

get/v1/trades/metrics

Request

  • Base URL
    https://md.kairos.trade
  • Auth
    • none
    • or API key in header X-Client-Id and API key in header X-Api-Key and API key in header X-Api-Secret

Query parameters

provider'kalshi' | 'kalshi_offchain' | 'polymarket' | 'dome' | 'opinion' | 'predictfun' | 'hyperliquid' required

Venue identifier, case-insensitive. kalshi_offchain aliases kalshi; dome aliases polymarket. Whether provider resolves to Kalshi determines which aggregation query runs — see the operation description.

contract_idstring required

Venue-scoped contract/token identifier to compute metrics for.

window_secondsinteger

Trailing window, in seconds, measured back from the current server time. Valid range [3600, 86400]; out-of-range or non-integer values are rejected with 400.

Response

Aggregated metrics for the window. Present with all-zero volumes (and coverage_pct: 0) rather than a 404 when no trades exist.

Example response

{
  "metrics": {
    "volume_usd": 184032.55,
    "outcome_0_volume_usd": 121004.1,
    "outcome_1_volume_usd": 63028.45,
    "outcome_0_volume_share_pct": 65.8,
    "trade_count": 5123,
    "window_seconds": 3600,
    "coverage_pct": 97.2
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.