If you've traded on Polymarket, you've noticed: some contracts seem mispriced. A team is winning by 15 points in the third quarter, but the market still has them at 72 cents. Your gut says it should be 85+.
That gap between what a contract should be worth and what the market is asking — that's called an edge. And building a bot to find those edges automatically is exactly what we do at ZenHodl.
The Core Idea
A prediction market bot does three things:
- Estimates fair probability — using a machine learning model trained on historical game data (score, time remaining, Elo ratings)
- Compares to market price — what Polymarket is currently asking for the contract
- Buys when there's a gap — if the model says 85% but the market asks 72 cents, that's a 13-cent edge
The key insight: the model must be independent from the market. If you train on market prices, your model just learns to agree with the market — and can never find mispricings.
What Makes a Good Edge?
Not every disagreement between model and market is tradeable:
- Edge > 8 cents: Below this, execution costs (fees + slippage) eat the profit
- Fair WP > 65%: The model should be reasonably confident, not just slightly disagreeing
- Not too cheap or expensive: Contracts between 35-78 cents have the best risk/reward
- Score differential: Tight games are noisy. A 10-point lead in Q3 is more reliable
Hold to Settlement
The simplest — and most profitable — strategy is to buy and hold to settlement. The contract resolves to $1.00 (win) or $0.00 (lose) after the game ends. No need to time exits or watch the market.
Buy at 72 cents, team wins → +28 cents profit. Buy at 72 cents, team loses → -72 cents loss.
At 71.9% win rate (our backtest average), the math works: 0.719 × 28 - 0.281 × 72 = +0.1c/trade before even counting the edge. With a 10+ cent edge, it compounds quickly.
The Tech Stack
A complete prediction market bot needs:
- Data pipeline: Scrape ESPN for live scores (every 5 seconds during games)
- Elo ratings: Track team strength across 900+ teams
- WP model: Predict win probability from game state (score, time, period, Elo)
- Market connection: Polymarket CLOB API for prices + order execution
- Edge detector: Compare model output to market ask, filter for quality
- Trade logger: Track every signal, entry, and outcome
This is exactly what our 6-module course teaches you to build from scratch — or you can use our live API to get the signals without building.
Getting Started
The fastest way to see this in action:
- Try our free calculator — search any live game and see fair WP vs market price
- Download Module 1 free — build the ESPN data scraper yourself
- See live results — real trades from this system, updated weekly
Want to build your own bot? The ZenHodl course takes you from zero to a deployed sports betting bot in 6 notebooks. Works with Polymarket, Kalshi, DraftKings, and any sportsbook. $49 one-time, AI-friendly.