Kalshi market-making bot
Solo project · Nov 2025–present
A fully-automated market-making system I designed, built, and run on Kalshi's prediction markets.
What it does
The system quotes two-sided prices on Kalshi event contracts, posting both a price it will buy at and one it will sell at, and earns the gap between them (the bid–ask spread) while keeping inventory and risk inside tight bounds. It also picks its own markets: scanner tooling surfaces candidate markets worth quoting and feeds a config pipeline that regenerates and hot-deploys per-market parameters. The bot runs unattended as a long-lived service, reacting to the order book in real time and carrying positions into contract settlement.
How it's built
- Real-time ingestion. WebSocket order-book and fill feeds with per-market sequence-continuity checks. Any gap invalidates the local book and forces a fresh snapshot, so the bot never quotes off drifted state.
- Quoting engine. Quote eligibility and placement adapt to the live spread regime and to the depth of the external book, with the bot's own resting orders subtracted out first. Sizing responds to realized fill activity and time of day, quotes ladder across multiple price levels, and correlated markets are quoted in a coordinated way rather than independently.
- Risk management. Inventory is skewed back toward flat under per-market position caps, each event carries its own stop-loss, and detected risk events trigger cooldowns that pull quotes when flow looks informed.
- Order lifecycle. Place/amend/cancel machinery with debounced re-quoting and coalesced mutations to minimize time out of the market, exact-decimal price and quantity handling, and fill attribution through recorded order lineage rather than heuristics.
- Fail-safes. A lease-and-fencing scheme guarantees only one instance can ever write orders. Ambiguous state quarantines the affected market instead of the whole bot, genuine incidents halt trading until a human acknowledges, and on restart positions are rebuilt from exchange truth before quoting resumes.
- Operations. ~75K lines of Python (asyncio, one event loop) with a 235-file test suite, deployed as a fleet of monitored services with 15-minute health checks and canary rollouts for parameter changes.
Details about my market-selection criteria, signals, and parameter values are kept proprietary.
Results
Between January and June 2026 the two accounts booked $64,204 in combined net profit on 287,920 fills across 18,306 distinct markets. The returns were steady enough to run at a 5.9 annualized Sharpe (return relative to how much the equity swung): 157 of 179 trading days closed green (88%), the worst day lost $271 against a best day of $12,213 — Super Bowl Sunday, and most of that came not from the game but from the half-time-show and stadium-attendance prop markets. The deepest peak-to-trough drawdown was $472, under one percent of peak equity. The bot went live in November 2025; profits before January were negligible and aren't included in these figures.
| Account | Net P&L | Win rate | Trades | Markets |
|---|---|---|---|---|
| Account 1 | $39,036 | 70.5% | 159,249 | 16,469 |
| Account 2 | $25,168 | 70.7% | 128,671 | 12,176 |


The bot trades on live credentials, so the source isn't public. The chart and statistics come from my full trade exports; the two panels above summarize each live account. Everything is current as of the end of June 2026.