Best Prediction Market APIsbuilder's guide · 2026 Open Kairos

Official venue APIsAPIfree

Kalshi Trading API: what it exposes, how it authenticates, where it stops

Last checked 2026-09-08

VenuesKalshi
PricingFree.
TypeAPI
Open sourceNo

The Kalshi Trading API is the programmatic front door to Kalshi's event contracts and, on a member-by-member rollout, its perpetual futures. It ships three transports: REST, WebSocket and FIX, all documented at docs.kalshi.com with OpenAPI and AsyncAPI specs.

It is built for traders who want a regulated US venue with a real demo environment and a rate-limit ladder that scales with volume. Public market data needs no key at all.

What the API exposes

REST lives at https://external-api.kalshi.com/trade-api/v2 (the older api.elections.kalshi.com host still works and serves every market, not only elections). The demo host is https://external-api.demo.kalshi.co/trade-api/v2 with mock funds and separate credentials.

Market endpoints cover series, events, markets, orderbooks (single and batched), trades and candlesticks at 1, 60 and 1440 minute widths. Portfolio endpoints cover balance, positions, fills, settlements, orders, order groups with a rolling 15-second contract limit, and up to 63 numbered subaccounts on the Advanced tier and above.

Order entry uses the V2 endpoints (create, batch create, amend, decrease, cancel, batch cancel, cancel all); the legacy /portfolio/orders path is deprecated no earlier than May 6, 2026. RFQs, block trades and quotes sit under the communications endpoints.

  • WebSocket at wss://external-api-ws.kalshi.com/trade-api/ws/v2: orderbook deltas, market ticker, public trades, user fills, user orders, market positions, lifecycle events, RFQ notifications and order group updates.
  • FIX: order entry on ports 8228 (no retransmission) and 8230 (with retransmission), drop copy 8229, post trade 8231, RFQ 8232, market data 8233 on a separate host.
  • Historical tier: markets, trades, orders and positions older than the published cutoff move to /historical endpoints; the live window targets 3 months.
  • Perps API mirrors the event contract API under /margin with its own WebSocket and FIX hosts, and is rolling out member by member in production.

Authentication and rate limits

Every private request carries KALSHI-ACCESS-KEY, KALSHI-ACCESS-TIMESTAMP (milliseconds) and KALSHI-ACCESS-SIGNATURE, an RSA-PSS SHA256 signature over timestamp, HTTP method and the path without query parameters. Kalshi does not store the private key after generation.

Rate limits are token buckets. A default request costs 10 tokens. Basic is 200 read and 100 write tokens per second; Advanced 300/300, Expert 600/600, Premier 1,000/1,000, Paragon 2,000/2,000, Prime 4,000/4,000, Prestige 10,000/8,000. Advanced is granted by calling the Upgrade Account API Usage Level endpoint; Expert and above come from trailing volume share (Expert needs 0.075% to earn and 0.05% to keep, Prestige 1.00% and 0.80%) or manual assignment.

Members on Premier and above can request AWS PrivateLink; Prime and above can discuss VPC peering for WebSocket traffic.

Pricing and access

The API itself has no listed fee. Keys are created from Account Settings, or through the Generate API Key endpoint, and the same flow works for demo and production. Public market data endpoints work without authentication.

Official SDKs are kalshi_python_sync, kalshi_python_async and kalshi-typescript; the old kalshi-python package is deprecated. Kalshi's own docs warn that SDKs may lag the API and recommend generating a client from the OpenAPI spec for production.

Where it falls short

The live and historical split means two code paths for anything older than the cutoff, and the cutoff timestamps advance over time.

Exchange sharding adds an exchange_index to routing and balance allocation, which a simple bot must learn to handle before batch cancels behave as expected.

Higher tiers are earned with volume, so a new account starts at 200 reads per second and needs the Upgrade call to reach 300.

Who should use it

Anyone trading Kalshi systematically. The demo environment, FIX gateway and published tiers make it the most complete first-party API among the US venues.

If you only need prices, hit the public REST endpoints or the market WebSocket channels without a key.

Questions about Kalshi Trading API

Is the Kalshi API free?

The docs list no charge for API keys or market data. You pay Kalshi's normal trading fees on fills, which vary by series and are exposed through the fee endpoints.

Does the Kalshi API have a sandbox?

Yes. The demo environment at demo.kalshi.co uses mock funds, with REST at external-api.demo.kalshi.co and its own API keys.

What are the Kalshi API rate limits?

Seven tiers from Basic (200 read, 100 write tokens per second) to Prestige (10,000 read, 8,000 write). A default request costs 10 tokens.

Does Kalshi support FIX?

Yes. Order entry, drop copy, post trade, RFQ and market data sessions run on ports 8228 to 8233, with separate hosts for the perps FIX gateway.

read the docshandle authmatch marketsexecute

Official APIs for building. One book for trading.

Rather trade the spread than build the plumbing? The free Kairos terminal gives you Kalshi, Polymarket and Predict.fun in one order book.