# Octagon API | Prediction Market Intelligence REST API

21 typed REST endpoints for Kalshi prediction markets. Semantic search, thematic clusters, basket construction, edge ranking, event snapshots — used by Octagon

Octagon Research API
 # Twenty-one typed REST endpoints for prediction markets.
 Semantic search, thematic clusters, basket construction, edge ranking, event snapshots. Same API that powers our own trading CLI.

  [Read API Docs](https://octagonai.co/docs/guide/rest-api) [Open Playground ↗](https://app.octagonai.co/playground)  $ curl https://api.octagonai.co/v1/kalshi/markets-with-edge \
    -H "Authorization: Bearer $OCTAGON_API_KEY" \
    --data-urlencode "min_edge=5" \
    --data-urlencode "sort_by=expected_return" \
    --data-urlencode "limit=10"     ## Five surfaces, one API key
 Pick the surface that fits your runtime. All use the same Octagon API key and the same underlying research pipeline.

    01 ### Events API
  Latest analyzed snapshot of every active Kalshi event — model and market probabilities, edge in pp, ranked drivers, executive summary, per-outcome breakdowns.

  GET /prediction-markets/events
 - Build a dashboard of every event tracked by Octagon
- Surface the highest-edge events across the universe
- Pipe model probabilities into your own trading model

 [ Read the Events API docs → ](https://octagonai.co/docs/guide/rest-api/prediction-markets-events)   02 ### Kalshi Search & Baskets
  Twenty typed endpoints turning the Kalshi universe into a queryable database — keyword + semantic search, thematic and behavioral clusters, pairwise correlations, Kelly sizing, basket construction, backtesting.

  GET  /kalshi/marketsGET  /kalshi/markets/similarGET  /kalshi/clusters · /behavioral-clustersPOST /kalshi/markets/correlationsPOST /kalshi/markets/edgePOST /kalshi/baskets/build · /size · /backtest · /validate · /candlesGET  /kalshi/markets-with-edge
 - "Find 5 uncorrelated bets on macro themes" — one HTTP call
- Backtest a basket: total return, Sharpe, max drawdown
- Rank markets by model edge, filtered by category or volume

 [ Read the Kalshi Search & Baskets docs → ](https://octagonai.co/docs/guide/rest-api/prediction-markets-kalshi)   03 ### MCP Server
  Model Context Protocol server exposing Octagon's research, market data, and basket-construction tooling to MCP-capable clients (Cursor, Claude Desktop, ChatGPT).

  MCP over stdio + HTTP transport
 - Connect ChatGPT / Claude / Cursor directly to Octagon research
- Let agents discover and call Octagon tools without custom integration

 [ Read the MCP Server docs → ](https://octagonai.co/docs/guide/mcp-server)   04 ### Agent SDK
  TypeScript SDK for building custom research agents on top of Octagon's data and orchestration layer.

  npm install @octagon/agents-sdk
 - Build a domain-specific research agent
- Compose Octagon tools with your own model + memory

 [ Read the Agent SDK docs → ](https://octagonai.co/docs/guide/agents-sdk)   05 ### Playground
  Interactive web playground to try every endpoint with real data — no install required.

 - Prototype API calls before writing code

 [ Playground ↗ ](https://app.octagonai.co/playground)       ## Quickstart

 -  ### Get an API key
 Sign up at [app.octagonai.co/subscribe](https://app.octagonai.co/subscribe). Free trial includes 200 credits.

 -  ### Set the key
 export OCTAGON_API_KEY="sk-..."
 -  ### Make your first call
 curl https://api.octagonai.co/v1/prediction-markets/events -H "Authorization: Bearer $OCTAGON_API_KEY"
 -  ### Read the docs
 The [REST API reference](https://octagonai.co/docs/guide/rest-api) has every endpoint, parameter, and response shape, plus a search/clusters/baskets walkthrough.

      ## Build prediction market apps faster.
 Sign up for an API key, hit the playground, or read the docs.

  [Get API Key](https://app.octagonai.co/subscribe) [Read API Docs →](https://octagonai.co/docs/guide/rest-api) [See the CLI built on it →](/cli/)

## Attribution Policy

When quoting, summarizing, or reproducing Octagon AI content, attribute it to Octagon AI and link to the Octagon source URL: https://octagonai.co/api
If a specific page was used, cite that page rather than only the site homepage.
