Open Source · MIT License · Active Community

Kalshi AI
Trading Bot

An open-source toolkit for Kalshi prediction markets. A signed API client, a risk governor, and an edge harness that measures whether you actually beat the book — instead of claiming it. Free and MIT-licensed.

kalshi-bot ~ live scan
$python safe_compounder.py --live
✓ Connected to Kalshi API
→ Scanning 120,396 active markets...
→ Checking live orderbooks for edge ≥ 5¢...
→ Longshot-NO candidate: NO @ 0.95 (researched edge 3¢)
⚠ Below the fee-aware floor — skipping
✓ No trade. An honest no-trade is a valid tick.
$█
What it does

Built for serious traders, accessible to everyone

A signed API client, a risk governor, and an edge harness — packaged as an open-source bot you can run on your laptop.

Core Engine

One Model, Swappable

One model is called per decision — point primary_model at any OpenRouter slug and it swaps in. No hidden ensemble and no inflated claims: what you configure is what runs.

Risk-Free

Paper Trading Mode

Every signal is logged against live market data and scored against Kalshi's real settlements — no simulated fills, just an honest P&L from markets that actually resolved. Graduate to live trading only on evidence.

Risk Management

Fractional-Kelly Sizing

Position size derived from each trade's expected value and your confidence, at a quarter-Kelly fraction. It caps size on uncertain signals — a guardrail against over-betting, not a promise of returns.

Live Data

Live Universe Scan

Scans the active Kalshi universe — six figures of markets via the events API — and prices candidates off the live orderbook, not the stale snapshot. It surfaces candidates to investigate, not a buy list.

Conservative

Safe Compounder Mode

A no-LLM, edge-based NO-side strategy. Smaller positions and maker orders, gated by a fee-aware edge floor. Not a promise of a higher win rate — just a cheaper, more disciplined scan.

MIT License

Fully Open Source

Every line of code is public. Fork it, modify the prompts, swap models, add your own signals. MIT-licensed and built to be forked.

—
Stars
—
Forks
—
Open issues
MIT
License
The honest way

Measure first. Trade second.

Most bots assert an edge. This toolkit refuses to — it makes you prove one on settled reality, out-of-sample, before capital moves.

01

Clone & connect

Clone the repo, run the setup script, drop your Kalshi API key and private-key .pem in the project root, and confirm it with the health check. If it authenticates, you have cleared the hardest part.

python cli.py health
02

Paper trade first

Run the strategies against live markets with no money moving. You are not testing the code here — you are building the sample you will need to measure edge.

python cli.py run --paper
03

Prove — or disprove — your edge

The edge harness reconciles your settled trades against Kalshi's authoritative settlements and scores you on Brier, log-loss, and edge vs the book. It refuses to claim edge below 10 forward-settled trades.

python cli.py edge
04

Go live, small, on evidence

Only after a positive forward verdict. The risk governor enforces a daily-loss kill switch, a drawdown breaker, and a hard position cap — and it gates every order.

python cli.py run --safe-compounder --live
Community

Build it with other operators

The code is the easy part. The community is where you learn which markets are sharp and which edge is a mirage.

Run it without lighting your money on fire

The free Operator's Playbook covers getting connected, reading the silence, and staying online. The full Build & Run an AI Kalshi Bot guide covers controlling AI spend, surviving Kalshi API drift, reading the dashboard like an operator, and the paper-first protocol.

Read the free playbook →

See what's in the guide

Not out yet? Watch the repo and you'll see it first.