Integration/Kalshi Exchange API

Kalshi API SDK for Python & TypeScript

Connect to Kalshi's event contracts API with type-safe methods, built-in key authentication, and a unified interface that also works across Polymarket, Limitless, and more.

pip install pmxt|npm i pmxtjs

Get your API key at pmxt.dev/dashboard

import pmxt

# Read Kalshi via PMXT's hosted catalog — no Kalshi key needed
client = pmxt.Kalshi(pmxt_api_key="pmxt_live_...")

# Search events and get live prices
events = client.fetch_events(query="Fed rate decision")
market = events[0].markets[0]

print(f"{market.title}: {market.yes.price}¢")

Without pmxt

build timestamp
construct signing message
load RSA private key
sign with PSS + SHA-256
base64 encode signature
set three auth headers
make request
parse JSON response

8 steps before you get data

With pmxt

client = pmxt.Kalshi(
    pmxt_api_key="pmxt_live_..."
)
events = client.fetch_events()

FAQ

Does pmxt replace Kalshi's official API?

No. pmxt calls Kalshi's REST API under the hood. It's a typed convenience layer with automatic authentication, not a proxy or replacement.

Do I need a Kalshi account to use pmxt?

For trading, yes — you need Kalshi API credentials. Public market data like events and prices can be fetched without authentication.

How does pmxt handle Kalshi's RSA-PSS authentication?

Kalshi requires RSA-PSS signing with SHA-256 on every request, including millisecond timestamps and path-based message construction. pmxt handles all of this — key loading, signature generation, and header injection — so you never write auth code.

Can I use pmxt with Kalshi's demo environment?

Yes. Point the SDK at Kalshi's demo API (demo-api.kalshi.co) to test your integration with paper trading before going live.

What happens if I want to switch from Kalshi to Polymarket?

Change the exchange class from pmxt.Kalshi to pmxt.Polymarket and update your credentials. The rest of your code — fetching events, placing orders, reading portfolios — stays the same.

Is pmxt affiliated with Kalshi?

No. pmxt is an independent open-source project. Kalshi is a registered trademark of Kalshi Inc.

Start building with Kalshi

Two lines to connect. Full API from there.