The Kalshi API, and the research layer that sits on top

The Kalshi API is a REST interface to the exchange itself — markets, order books, orders, positions — authenticated with an API key plus RSA request signing, with a demo environment for development. It's an execution API: excellent at telling you what's trading and letting you trade it, silent on what's worth trading. That second question is the layer Octagon's API provides — research, search, and model-vs-market edge across every active Kalshi market.

What the Kalshi API gives you

  • Market data: events, markets, order books, trades, and candlestick history across every listed contract.
  • Trading: order placement and management, positions, fills, and portfolio state for your account.
  • Auth model: an API key ID paired with an RSA private key; private requests carry a signed timestamp. Treat the private key like a password — anyone holding it can trade your account.
  • Demo environment: same API, paper money. Build there first; promote to production by switching base URL and credentials.
  • Rate limits: tiered, with higher throughput historically earned via activity rather than bought. Design your client to respect limits from day one — polling every market naively will hit them fast.

The gap: data, not judgment

Everything above is exchange plumbing. The hard part of trading Kalshi programmatically isn't fetching the order book — it's deciding, across thousands of open contracts, where the price is wrong. That requires research infrastructure: news ingestion, probability modeling, and a way to compare your estimate against the market's. Octagon builds exactly that layer and exposes it as an API:

Kalshi API vs Octagon API

Execution layer versus research layer — they compose rather than compete.
Dimension Kalshi API Octagon API
What it serves Exchange primitives: markets, order books, positions, orders, fills Research layer: search, thematic clusters, correlations, baskets, model-vs-market edge, cited reports
Authentication API key ID + RSA-signed requests, per-account Bearer API key; OAuth on the MCP server
Account required Yes — KYC'd Kalshi account Octagon account; no Kalshi account needed for research
Trading Yes — place and manage orders No — research and data only
AI-agent access Build it yourself against REST Hosted MCP server + OpenAI-compatible endpoints
Typical use Execution: bots, order routing Deciding what to trade before routing the order

Octagon's prediction-markets surface is 21 typed REST endpoints — semantic and structured search over every active market, thematic and behavioral clusters, correlation matrices, one-call basket construction with Kelly sizing, and per-event research reports with a model probability, all documented in the developer docs. The same capabilities are exposed for AI agents through a hosted MCP server, so a Claude or Cursor agent can query Kalshi research without you writing an integration.

A sane build order for a Kalshi bot

  • 1. Prototype against the demo environment with market data only — no orders until your data pipeline survives a week unattended.
  • 2. Add a research signal. A bot that trades raw order-book patterns competes with market makers; a bot that trades information needs a probability estimate per market — build one or consume Octagon's edge endpoints.
  • 3. Gate execution with risk controls: position caps, per-market exposure, and a kill switch. Event contracts settle binary — sizing mistakes are unforgiving.
  • 4. Or start from the open-source reference: Octagon's Kalshi trading CLI implements this whole stack — deep research, edge computation against the live book, Kelly sizing, and a multi-gate risk engine. Our guide to Kalshi trading bots covers the architecture.

Frequently asked questions

Is the Kalshi API free?

Access comes with a Kalshi account — there's no separate API subscription. Rate limits are tiered, with higher tiers historically earned through trading activity rather than purchased. Building against the demo environment first is free and doesn't risk real money.

How does Kalshi API authentication work?

Private endpoints use an API key ID plus request signing with an RSA private key you generate — each request carries a signed timestamp header rather than a bearer token. Public market-data endpoints are readable without account credentials.

Does Kalshi have a sandbox or demo API?

Yes — a demo environment with the same API shape and fake money, which is the right place to develop and test a bot before pointing it at production. Flip environments via base URL and separate credentials.

Can I build a trading bot with the Kalshi API?

Yes; the API exposes everything a bot needs — market data, order placement, positions, and fills. If you'd rather not start from zero, Octagon maintains an open-source AI trading CLI for Kalshi that researches markets, computes edge against the live order book, and executes with risk controls. It's linked from our developer docs.

What does Octagon's API add on top of Kalshi's?

Kalshi's API tells you what's trading; Octagon's tells you what's worth trading. It layers semantic search, thematic clusters, correlations, basket construction, and — the core — a model-estimated probability versus the live market price for every active market, exposed as typed REST endpoints, an OpenAI-compatible interface, and a hosted MCP server for AI agents.

Add the research layer

Octagon's API and MCP server give your code — or your AI agent — model-vs-market edge across every active Kalshi market.