Trades

Fetch volume and outcome-pressure metrics for a contract

Returns aggregate trade metrics (volume, per-outcome volume split, trade count) for a single (provider, contract_id) over a lookback window, computed from Kairos's own ingested trade store — same data source as /trades/history, not a live upstream proxy. There is no buy/sell-side breakdown: metrics are split by outcome (outcome_0/outcome_1) rather than trade direction, since trade direction cannot be reliably determined from exchange data for all providers.

Auth: requires the trade:read scope (admin/JWT bypass the scope check; API keys need trade:read), plus API access to the requested provider being enabled for API-key callers — 403 if disabled.

Staleness: if trigger_ingest=true and ingestion coverage for the window is low, the service triggers a backfill/ingestion job and reports it via the indexing flag on the returned metrics object.

get/trades/metrics

Request

  • Base URL
    https://data.kairos.trade
  • Auth
    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

providerstring required

Venue identifier, matched case-insensitively against the live provider registry.

contract_idstring required

Provider-specific contract identifier. Empty or >128 chars returns 400.

window_secondsinteger

Lookback window in seconds, ending "now". Clamped to [3600, 86400] (1 hour to 24 hours).

trigger_ingestboolean

If true, triggers ingestion when coverage for this window is low, rather than computing metrics from partial/stale data alone.

Response

Aggregate volume/pressure metrics for the window.

Example response

{
  "metrics": {
    "volume_usd": 154320.55,
    "outcome_0_volume_usd": 98210.1,
    "outcome_1_volume_usd": 56110.45,
    "outcome_0_pressure_pct": 63.65,
    "trade_count": 842,
    "window_seconds": 86400,
    "coverage_pct": 100
  }
}

Changes

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