Guide · updated 2026-11-25
Kalshi API
Kalshi publishes a Trade API for event contracts and a separate perps API. Production and demo do not share keys.
Kalshi’s welcome page says the docs cover the exchange API for real-time market data and trade execution. It splits the surface in two:
- Predictions: event contracts, with REST, WebSocket, and FIX.
- Perps: perpetual futures on margin, also REST, WebSocket, and FIX.
The environments page is where the hosts are written down.
| Production (recommended) | Also supported | Demo | |
|---|---|---|---|
| REST | https://external-api.kalshi.com/trade-api/v2 |
https://api.elections.kalshi.com/trade-api/v2 |
https://external-api.demo.kalshi.co/trade-api/v2 |
| WebSocket | wss://external-api-ws.kalshi.com/trade-api/ws/v2 |
wss://api.elections.kalshi.com/trade-api/ws/v2 |
wss://external-api-ws.demo.kalshi.co/trade-api/ws/v2 |
The elections hostname is not an elections-only API. The page says the production Trade API covers all Kalshi markets. Demo keys do not work in production, and the reverse is also true.
Signing does not include the hostname or the query string. For https://external-api.kalshi.com/trade-api/v2/portfolio/orders?limit=5 you sign /trade-api/v2/portfolio/orders.
The welcome page points at openapi.yaml and asyncapi.yaml as the specs, and it warns, on the SDK page, that the published clients can lag those specs. There is also a hosted MCP connector that reads markets and, with OAuth, a portfolio. That connector’s doc says it does not place orders.
kalshi.com returned HTTP 429 when this page was written, so nothing here is taken from the marketing site or the fee schedule. See fees.
Listings: Trade API, WebSocket, Python, TypeScript, Perps.
Not trading, tax, or legal advice. Vendor figures were read from the linked pages on 2026-11-25 and can change.