9 min read

Anatomy of a Kalshi NFL Trading Bot

Last week I built a real-time trading bot that monitors ESPN win probability and trades on Kalshi prediction markets. The thesis was simple. ESPN updates faster than TV, so maybe it updates faster than the market too. Detect a probability spike, buy before Kalshi adjusts, and hopefully make a profit.

Unfortunately, this didn't work, but I learned a bit about how sports betting bots work in the process of building it. In this post, I will break down how the bot works, what I discovered when I ran it during the NFL playoffs, and what you'd actually need to compete in live sports betting markets.

A couple of notes:

1) If you've been sports betting for a while, a lot of this is probably obvious to you. But this area was new to me, and I suspect it's new to others out there too. I wanted to share my findings from running a bot during a specific NFL game.

2) I'm not trying to promote or glamorize sports betting or trying to sell anything, I was genuinely curious about how to build a prediction market bot, and I'll be open sourcing all of the code once I clean it up a bit.

The Original Thesis

Have you ever had ESPN's GameCast open while watching a game on TV? The play-by-play updates before you see it happen on screen. ESPN shows "Touchdown, 45-yard pass" and then a few seconds later, you actually see the play.

So I thought: if ESPN is ahead of TV, maybe it's ahead of prediction markets too.

Here's how it was was supposed to work (at least in my head):

1. Big play happens (45-yard TD)
2. ESPN recalculates: win probability jumps 52% → 59%
3. The play actually happens on TV, but the Kalshi market still sitting at 52¢
4. I buy at 52-53¢ before the Kalshi market adjusts to 59¢
5. Profit: 5-10% per contract

Simple, right? Detect the signal, trade before the market catches up.

Spoiler: Kalshi traders and professional sporters bettors have access to data feeds that are at least 30 seconds faster than the unofficial ESPN API. My thesis was wrong.

This post is for subscribers only