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.
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.