How did Jordan Metzner build a Kalshi trading bot with Claude Code?

Short answer: Jordan Metzner says he wanted near real-time feedback, so he targeted soon-to-expire live sports trades. He built the algorithm with Opus 4.5, Cursor and Claude Code on Kalshi's API, since Polymarket is not available in the US.

Watch this answer from Episode 26

Watch this answer from Episode 26 (starts at 4:16) · Episode 26 notes and transcript

What was said on Built This Week

From Episode 26: We Built an AI Trading Bot for Prediction Markets — Here’s What Actually Happened, starting at 4:16.

Jordan Metzner [4:15]: So, one, I'm not really a good gambler and I don't know a lot about sports. So I think that puts me in a good position because I honestly have no idea who is gonna win the soccer game today between two teams in like the British Premier League. I don't know any of that kind of stuff. And so I figured, I'm gonna build a trading bot. So, first let me give you some parameters of like, what I thought would be important if I was gonna build a trading bot. So the first thing I think that's important to me is like, need feedback. And I need as close to real time feedback as possible because during development, I wanna know if like, my algorithm works, if I'm right or wrong. And so, any type of long dated trade is really not a good option for me. So who's gonna win the World Cup? Who's gonna be, the nominee for the next presidential election? Like, those types of trades, they don't really work for me because they're so long dated and so far out. Now they could be good trades for other people, but I just don't really have the time to figure that out. And so what I'm looking for are trades that that basically are gonna expire soon. And I don't care when they started, but they're gonna expire soon. Right?

Jordan Metzner [5:12]: So I'm looking for live trades, and normally the best types of live trades happen to be sports because there's a sports going on all the time. Now, again, like I said, I don't really know anything about sports. So, how should I make these trades? What is my algorithm? How does it work? Right? And so what I did was kinda built an algorithm, obviously, using, Opus 4.5, using Cursor, using Claude Code, using a few different tools. I think you know this, Polymarket's not available to traders in The United States. So Polymarket wasn't available to me. Kalshi is available to me and has a fully robust API, so I chose to do Kalshi. I put about $250 into my account, and you can see my current account's at $2.43. So I'm down about, a little less than $6.60, so about $7. And in total, made about 12 trades. And of those 12 trades, I actually won eight of the 12. So I was actually at about 66% success rate in those trades.

Jordan Metzner [6:00]: And yet even with that, I was still negative on my trades. I had a negative yield here. It says, like, overall of 2.6. I didn't trade all the $250. I probably only trade, like, $20.30, $40 at most. So I would say, like, overall relative percentage wise, it's probably even higher as a brute percentage. But I think what really killed me was the transaction fees, which I really wasn't predicting as well and didn't have it in my original algorithm. So, anyway, nonetheless, let me show you a little bit of what's happening. And so what's happening right now is and you can see a change in real time, but essentially, there's a live alert feed that is constantly looking over all the active trades that are happening on Kalshi. And you can see if we go down here, you can kind of see some of this different activity happening.

Tools mentioned

More questions from this episode

Go deeper

New episode every week

Watch us build with AI, live.

Real builds, founder interviews and the AI news that matters. Join 43K+ builders on YouTube.

▶ Subscribe on YouTubeBrowse all episodes →