Best Prediction Market APIsbuilder's guide · 2026 Open Kairos

SDKs & wrapperslibraryfree

kalshi-python-sdk: what it does, what it costs, where it stops

Last checked 2026-09-08

VenuesKalshi
PricingOpen source (MIT).
Typelibrary
GitHub stars6

kalshi-python-sdk is a community Python SDK for Kalshi, installed as kalshi-sdk from PyPI. Its README claims 108 of 109 REST operations across 19 resources mapped against Kalshi's OpenAPI v3.29.0, 12 typed WebSocket channels, a separate Perps client and an async FIX engine. The repo has 6 stars and was pushed September 6, 2026.

It is for Python traders who want the whole Kalshi surface, including perpetuals and FIX sessions, typed end to end. Casual users pulling a few markets will find pykalshi lighter.

What it does

Sync and async clients share one transport. Orders go through the V2 event-market family (create_v2, amend_v2, decrease_v2, cancel_v2, cancel_all_v2 plus batched variants) using Decimal prices and a required client_order_id for idempotency. Only GET, HEAD and OPTIONS retry; POST and DELETE never retry, to avoid duplicate orders.

PerpsClient and AsyncPerpsClient cover Kalshi's margin exchange (48 REST operations, 6 WebSocket channels) with separate API keys, and KlearClient covers the Self-Clearing-Member settlement API (23 operations) with bearer auth. The FIX engine speaks FIXT.1.1 and FIX50SP2 for order entry, drop copy, market data, post-trade and RFQ sessions.

  • Twelve subscribe_* WebSocket methods (ticker, trade, orderbook_delta, fill, market_positions, user_orders, order_group, market_lifecycle, multivariate_lifecycle, communications, cfbenchmarks_value, cfbenchmarks_value_5hz) plus a generic escape hatch.
  • Pydantic v2 models, mypy strict, py.typed shipped; optional pandas or polars extras for DataFrames.
  • Record and replay transports in kalshi.testing for offline tests.
  • Demo environment supported via KALSHI_DEMO=true or demo=True.

Pricing

Free under MIT. PyPI shows version 14.0.0 published September 6, 2026 and 34 releases since May 10, 2026. Python 3.12 or newer is required.

Venues and data

Kalshi only, across three surfaces: the prediction market API at api.elections.kalshi.com, the Perps API at external-api.kalshi.com, and the Klear settlement API. Contract tests are described as failing hard on query, body and WebSocket payload drift against Kalshi's published specs.

Pagination returns a Page object with a cursor, and list_all() iterates until the server returns no cursor, with an optional max_pages bound. Pages convert to DataFrames when the pandas or polars extra is installed.

Where it falls short

Six GitHub stars and a single maintainer is a thin base for something you would route live orders through. Fourteen major versions in four months signals a fast-moving API surface; the docs site carries v2 to v3 and v3 to v4 migration pages, so expect more.

Python 3.12+ excludes many existing environments. The inventory note of 107 of 108 operations is already stale against the README's 108 of 109, which is a sign of how often the spec and the package move.

Who should use it

Systematic Kalshi traders who need FIX or Perps from Python, or who want the entire REST surface typed rather than hand-rolled from the OpenAPI spec.

For a smaller, higher-starred community client with pandas and Jupyter conveniences, pykalshi is the other Python option.

Questions about kalshi-python-sdk

Is kalshi-python-sdk official?

No. It is a community package by TexasCoding. Kalshi's official packages are kalshi_python_sync, kalshi_python_async and kalshi-typescript.

Does kalshi-sdk support Kalshi Perps?

Yes. PerpsClient and AsyncPerpsClient cover 48 REST operations and 6 WebSocket channels on the margin exchange, using separate perps API keys.

Does kalshi-sdk support FIX?

Yes. It includes an async FIX engine (FIXT.1.1 / FIX50SP2) for order entry, drop copy, market data, post-trade and RFQ sessions, reusing the same RSA-PSS key as REST.

What Python version does kalshi-sdk need?

Python 3.12 or newer.

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.