₿BitCoinBettingKalshi · 15m

External HTTP · /api/v1

API

A versioned JSON API so scripts, dashboards, and agents can pull live Kalshi windows, settled history, chart series, and stored stats — without scraping the UI.

How it works

Every response is JSON with Cache-Control: no-store. CORS is open (*). If an API key is set in Admin (or EXTERNAL_API_KEY), callers must send Authorization: Bearer <key>.

Start at the catalog — it lists endpoints, auth mode, and tool names:

curl -s http://localhost:3000/api/v1

Endpoints

EndpointWhat it does
GET /api/v1Catalog, auth rules, tool index
GET /api/v1/openapi.jsonOpenAPI 3 document
GET /api/v1/toolsMachine-readable tool schemas for agents
GET /api/v1/events/currentLive 15m window (odds, BTC, orderbook)
GET /api/v1/events/{ticker}Snapshot for one event (live or settled)
GET /api/v1/events/{ticker}/seriesChart points for that window
GET /api/v1/historySettled windows + filters/sort (up to 10k)
GET /api/v1/statsSQLite crosses / max Yes–No win %
POST /api/v1/queryOne flexible body for history, stats, event, series

History filters

Query params on /api/v1/history: limit, cursor, result (above/below), minCrosses / maxCrosses, minYesWinPct / maxYesWinPct, minNoWinPct / maxNoWinPct, sortBy, sortDir, summary=1.

curl -s "http://localhost:3000/api/v1/history?limit=50&result=above&minYesWinPct=100&sortBy=maxYesWinPct&sortDir=desc&summary=1"

Flexible query

Prefer POST /api/v1/query when an agent needs structured filters in one shot:

curl -s -X POST http://localhost:3000/api/v1/query \
  -H "Content-Type: application/json" \
  -d '{
    "resource": "history",
    "limit": 100,
    "filter": { "result": "above", "minCrosses": 2 },
    "sort": { "by": "maxYesWinPct", "dir": "desc" },
    "includeSummary": true
  }'

resource can also be stats, current, event, or series.

Related

Tool schemas and how agents bind them: Tool tab. Workflow for models: AI tab.