Best Prediction Market APIsbuilder's guide · 2026 Open Kairos

SDKs & wrapperslibraryfree

pykalshi: what it does, what it costs, where it stops

Last checked 2026-09-08

VenuesKalshi
PricingOpen source (MIT).
Typelibrary
GitHub stars123

pykalshi is an unofficial Python client for Kalshi that adds the infrastructure the auto-generated official SDK lacks: WebSocket streaming with typed messages, exponential-backoff retries, domain objects, pandas .to_dataframe() and rich Jupyter display. It has 123 GitHub stars, is MIT licensed, and version 2.0.0 was published to PyPI on July 27, 2026.

It is for researchers and small systematic traders who live in notebooks. Its own comparison table concedes it does not cover the full Kalshi API.

What it does

A KalshiClient reads credentials from KALSHI_API_KEY_ID and KALSHI_PRIVATE_KEY_PATH in a .env file. Markets, orders and events are domain objects with methods: order.cancel(), order.amend(), order.decrease(), order.wait_until_terminal(), market.get_orderbook(), market.get_candlesticks().

Orders are placed on the single YES-denominated book with book_side bid or ask and price_dollars for the YES leg, matching Kalshi's current order model; the legacy Action and Side vocabulary still works and maps to the same wire body.

Market browsing covers status filters, series tickers such as KXBTC, candlesticks by period and recent trades. The bundled web dashboard (FastAPI, run with uvicorn) browses markets, order books and your portfolio and doubles as a reference implementation.

  • Feed class streams ticker, order book and trades over WebSocket; OrderbookManager rebuilds a local book from deltas.
  • Typed exceptions: InsufficientFundsError, RateLimitError, KalshiAPIError. Rate limits are retried with backoff automatically.
  • Optional extras: pykalshi[dataframe] for pandas, pykalshi[web] for a bundled FastAPI dashboard.
  • Colab demo notebook and examples including a momentum bot.

Pricing

Free under MIT. PyPI shows 19 releases between February 3, 2026 and July 27, 2026. Python 3.9 or newer. The pandas and web extras are optional and leave the core dependency set unchanged.

Venues and data

Kalshi only. Candlesticks, order books and trades come from Kalshi's public endpoints; balance, positions, fills and orders need API credentials generated in the Kalshi account settings.

Where it falls short

The README's own feature table marks Full API coverage as absent, in contrast to the official generated SDK. Perps and FIX are not mentioned at all; kalshi-python-sdk is the community package that covers those.

Development is one author, and the last push was July 29, 2026. The PyPI links point at ArshKA/pykalshi while GitHub resolves the repo as arshka/pykalshi; both reach the same code.

Kalshi has deprecated the action and side pair, and pykalshi documents that the legacy vocabulary means different things on orders versus fills, so new code should read direction from book_side and outcome_side.

Who should use it

Analysts pulling Kalshi markets into pandas, and traders prototyping a strategy who want order lifecycle helpers and a live order book without writing WebSocket plumbing.

Anyone needing every endpoint, perps or FIX should pick kalshi-python-sdk or generate a client from Kalshi's OpenAPI spec as Kalshi itself recommends.

Questions about pykalshi

Is pykalshi official?

No. The README states it is an unofficial library not affiliated with Kalshi. Kalshi's official packages are kalshi_python_sync, kalshi_python_async and kalshi-typescript.

Does pykalshi support WebSocket streaming?

Yes. The Feed class subscribes to ticker, order book and trade channels with typed messages, and OrderbookManager maintains a local book from deltas.

Does pykalshi work with pandas?

Yes. Any list result, plus candlesticks and order books, has a .to_dataframe() method with the pykalshi[dataframe] extra installed.

Does pykalshi cover the whole Kalshi API?

No. Its own comparison table lists full API coverage as a feature of the official SDK, not pykalshi.

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.