Build a Kalshi Trading Tool in 5 Mintues

This walkthrough shows how to use ChatGPT with the Kalshi and Unabated APIs to build a private trading dashboard that tracks balances and positions, charts profit and loss, compares market prices with fair value, and supports order execution. The project grows from a simple API connection into a functional decision and trading tool through a series of prompts.

Back to Videos

If you've got 5 minutes, you've got enough time to build a tool to connect your Kalshi account to your own private dashboard.

Now, imagine what you could do in an hour.

If you want to get started making your own betting tools with AI, but you don't know where to start, I've got good news. It's far easier than you think. And I'm going to prove that to you. I'm going to show you the absolute easiest thing that you can do to get started, then how to layer in some basic functional information, and finally, how to add in a component that has actionable value by combining AI and APIs.

Connect Your Kalshi Account

By the end of this, you'll be so excited about the possibilities in front of you that it'll be like seeing the Matrix. Just lay off the leather trench coat. It's a tough look to pull off.

Let's start by getting you up and running in less than a minute. It's a little housekeeping and one prompt with an AI agent. For these examples, I'm not going to be showing my personal account, but rather these clips were made by one of our editors. All right, you ready for this?

Give me 60 seconds on the clock, Johnny. Thank you. Start by going to your Kalshi account and getting your API key. It's under account and security.

If you don't understand what an API key is, I'll explain it in a couple minutes. I'm on the clock here.

Next, go to your AI agent of choice. I'm using ChatGPT and start a new conversation. Here's the exact prompt that I used. I have a Kalshi API key. I want to create a dashboard that uses that API to report on my Kalshi balance, how much is in cash, how much is in open positions, and then I want to create cards for each open position that shows how many contracts, what price they were bought at, and what the current price is. AI will give you instructions on where to paste your API key.

Typically, it's kept in a .env file. That's used to stash sensitive environment variables for a project. Then follow the directions for launching your dash. And that's it. You're done.

How did I do on time? It really is that simple.

If you came from the long ago times when computers were magic and you spent your formative years in computer labs full of TRS-80s and Apple IIe's, you might remember learning enough BASIC to make it print "Hello world" on the screen. It was your entry-level computer piece back in the day. And this simple task is your "Hello world" of today.

Verify the API Connection

The fine minds behind RadioShack's computing division would have lost their minds if they could see what the version of that was 40 years later. Now, let's prove that it works.

We went to Kalshi and made a small buy, 10 contracts on the Yankees. As I mentioned earlier, this is interfacing with the Kalshi API. API stands for application programming interface. Just think of it as a set of commands for accessing Kalshi's information from within structured code. Your API key is like your login information for your personal account. You can see those 10 Yankees contracts show up on the dashboard.

Think of the API as the phone line that lets Kalshi call up our dash and tell it the news that we just made this significant, life-changing purchase of about five bucks. That's all well and good, but let's move on to something slightly more difficult. And by slightly, I mean just one more simple prompt.

Add a Profit-and-Loss Graph

We asked ChatGPT to add in a profit-and-loss graph so that we can track the value of our total portfolio in real time. It gave us a chart that refreshes every 5 seconds and captures 12 hours of profit or loss. Just to stress test the system, we made a couple more random buys.

We took two contracts on the Guardians tied at 6-6 late with the Tigers at 62 cents. We bought two contracts on the Braves against the Phillies at 48 cents each. And we grabbed two contracts on Peter Nouza and Neal Oberleitner who are allegedly tennis players in the US Open doubles. I have no idea. You could also tell me they're the names of elves who bake pies at midnight for a lonely widow in a German fairy tale and I believe you.

Point being, they all came over cleanly and we can see that the dashboard is cleanly picking up what we're doing on Kalshi itself.

Now we have something that looks pretty and has some basic info. But we can't really use it for much yet. So, what else is out there? Well, a price would be nice. That's our next logical step.

Add NFL Games and Prices

We asked ChatGPT to lay in the current week's NFL games along with the game's start time and venue so that we can spot any neutral site games at a glance. That was easy enough. One simple prompt got the job done. From there, it's time to start putting in actual useful information. So the next step is to add in a compact view of each game's moneyline, sides, totals, and alts.

All with an indicator that shows us how old the lines are and what the bid, which is how much someone is willing to offer to buy the bet at, and the ask, which is what it costs for you to buy the bet right now. This shows us a couple of things. The ask price tells us what we'd have to pay per contract to take the bet at the current market price. And the difference between the two, the bid-ask spread, gives us an idea of how active and liquid a market is. Narrow bid-ask spreads with decent liquidity on either side are usually an indicator of fairly efficient markets.

We even added a couple of bells and whistles here, like team logos and getting prices for both yes and no, and displaying prediction market prices in American odds. You can do any little cosmetic tweaks that you'd like. AI is up to the task. But the really important part is now that we can see some prices, how can we connect it to an opinion, a source of truth? Specifically, a source like the one I co-founded, Unabated.

Add a Source of Truth

When we started Unabated almost 6 years ago, I wanted it to be a place where people could learn to become sharp sports bettors.

If they had the desire and the diligence to learn, we had the tools and the resources to help them get over any obstacles standing in their way. This project is a product of that mission statement. All three go a long way to helping boost our signal. So now we get to my favorite part, the source of truth. And we can use Unabated to find good bets. You can have Unabated come to you.

We took a key for the Unabated API, which now comes included with our Concierge tier membership, and we added that to our .env file. We attempted to wire up the dashboard to the Unabated Line, our vig-free consensus price for each game.

The value of having this on our screen is that we can directly compare our fair price to a price that's available on the prediction market. These markets can move extremely fast, especially once the games are in motion. Any little bit you can build out to help you execute your trades as quickly as possible helps in the long run.

You don't just have to be better than the competition, you have to be faster and stronger. Steve Austin. You have to be Steve Austin. You have the technology.

There was a little hiccup when we did this and all we had to do is ask it to look at the documentation for the Unabated API to fix it.

Most APIs include documentation pages and it's always an important step anytime you have agents working with new keys. After fixing the error, now we could see the fair price on sides, totals and moneylines and whether there was an edge against the Kalshi prices. Now the dashboard finally can answer a useful question. Is the price Kalshi is offering on a contract something that shows positive expected value? If it does, how does it fit into the rest of my current portfolio?

Execute Trades from the Dashboard

But we had one more change to make. I wanted to be able to execute right from this dashboard without having to switch back to the native Kalshi interface. I had ChatGPT make buy and sell buttons for any price on our screen. So now we can click on buy yes, buy no, sell yes, or sell no to open a ticket and put in our order. We can trade right from the dashboard every time we spot something that's plus EV. From zero to a trading tool in about 45 minutes. Not bad for a little hello world. Maybe computers are still magic.