I built Lockside — an automated bot that trades sports prediction markets on Kalshi (CFTC-regulated exchange). The strategy is simple: buy YES contracts when a team is winning by a safe margin in the final minutes. You pay 92-99c, collect $1 at settlement. Repeat. Day 1 results (dry run with real market data): Metric Value Trades 20 Win rate 100% Total deployed $1,522.52 Total profit $88.48 ROI 5.81% Avg buy price 95.1c Trading window 9.7 hours How it works: Detect — ESPN live data confirms a team is winning by a safe margin in the final minutes. Polls every 1.5 seconds across 22 sports. Analyze — 4-tier win probability model cross-references ESPN, bookmaker odds, and historical data. Kelly criterion sizes the bet. Execute — Laddered orders across multiple price levels on Kalshi. 6ms execution via WebSocket piggyback from an AWS us-east-1 box co-located with Kalshi’s servers. Edge breakdown by sport: Sport Trades Avg Price ROI NHL 6 94c 7.7% NCAAM 1 93c 7.5% MLS 2 94c 5.8% NBA 3 96c 4.3% MLB 1 99c 1.0% NHL has the fattest edge — games with 2+ goal leads in the final 5 minutes almost never come back. NBA is tighter because momentum swings happen faster. Risk controls (9 total):
- Circuit breaker on loss streaks
- Score retraction detection (flags, reversed goals)
- Anti-toxic orderbook validation (rejects manipulation)
- Slippage control, exposure caps, stale game filter
- Half-Kelly bet sizing with time decay Tech stack:
- Python (FastAPI + SQLAlchemy) on AWS ECS
- Next.js dashboard with live P&L, heatmaps, game tracking
- Kalshi WebSocket for real-time prices + orderbook signals
- Telegram alerts for every trade, fill, and settlement
- Co-located in us-east-1 — sub-1ms to Kalshi API What I learned:
- The edge is tiny (4.9c avg per contract) but extremely consistent. You’re not predicting outcomes — you’re collecting a premium for waiting until the outcome is nearly certain.
- Liquidity is the real constraint. Avg fill was 81 contracts but ranged from 1 (MLB at 99c) to 217 (NHL). The deeper the book, the better the sport.
- 95c+ contracts have very high implied probability but the bot adds additional confirmation via ESPN scores, so actual win rate should exceed implied.
- MLB at 99c is barely worth it (1c edge). The sweet spot is 92-96c where you get 4-8c edge per contract. submitted by /u/Affectionate-Bowl-98
Originally posted by u/Affectionate-Bowl-98 on r/ClaudeCode
