Kalshi News Bot: Open-Source AI Trading Bot for Prediction Markets
Open-source Python trading bot for the Kalshi prediction market API. Uses Claude AI to find mispriced events and trade automatically. ~300 lines, one-click deploy.
Summary: Open-source Python trading bot that polls Kalshi for open prediction markets, uses Claude to evaluate each market's probability, computes confidence-weighted edge, and places trades when mispricing is detected. Runs on Kalshi's free demo environment by default. Deployable to Railway in one click. ~300 lines of Python, no frameworks.
Topics: kalshi trading bot, claude AI agent, prediction market bot, news-reactive trading, one-click deploy, open source
Stack layers: Layer 4 — Intelligence
Related tools: Kalshi News Bot, Claude API, Kalshi API
Overview
A minimal, open-source Python bot that turns Claude into a prediction market trader. It polls Kalshi for open markets every 5 minutes, asks Claude to evaluate each one, and places trades when it detects a meaningful edge between Claude’s probability estimate and the market price.
Runs on Kalshi’s free demo environment by default — no real money needed to try it.
Deploy in One Click
Or clone and run locally:
git clone https://github.com/rsquaredsolutions2026/kalshi-news-bot.git
cd kalshi-news-bot
cp .env.example .env # add your API keyspip install -r requirements.txt
python bot.py
How It Works
Every 5 minutes:
1. POLL Fetch open markets from Kalshi
2. ANALYZE Ask Claude to evaluate each market
3. DETECT Compare Claude's estimate to market price
4. TRADE If edge > 5%, place a limit order
The bot skips sports markets (where Claude has no edge) and focuses on politics, economics, and current events where reasoning about public information matters.
Key Features
Claude-powered analysis — Sends each market to Claude with a structured prompt. Claude returns a probability estimate, confidence rating, and step-by-step reasoning.
Edge detection — Computes the confidence-weighted difference between Claude’s estimate and the market price. Only trades when the net edge exceeds a configurable threshold (default 5%).
Demo-first — Points to Kalshi’s free demo environment by default. Switch to production with one env var change.
Dry-run mode — Set DRY_RUN=true to log every decision without placing orders. Perfect for tuning.
~300 lines of Python — No frameworks, no async, no databases. Just a loop. Easy to read, easy to modify.
Requirements
Python 3.10+
Kalshi account with API keys (demo.kalshi.com for free testing)
Is there an open-source Kalshi trading bot on GitHub?
Yes. The Kalshi News Bot is an open-source (~300 lines of Python) trading bot that uses Claude AI to analyze Kalshi prediction markets. It detects mispriced events and places trades automatically. Available on GitHub under the MIT license with one-click Railway deployment.
Can an AI agent trade on Kalshi?
Yes. Kalshi provides a full REST API (api.elections.kalshi.com/trade-api/v2) and a free demo environment (demo-api.kalshi.co) for testing. AI agents can poll markets, evaluate probabilities, and place trades programmatically. The Kalshi News Bot demonstrates this using Claude for market analysis.
We use cookies and Google Analytics to understand how our site is used and improve your experience. See our Privacy Policy.
Get in Touch
Partnerships, listings, corrections, or press — we'd love to hear from you.