Pick the AI assistant you already use, grab a free API key, connect it to real Kalshi market data, and let it build you a simple prediction-market bot. No deep coding background needed.
Vibe-coding is just building software by chatting with an AI assistant in plain English. You describe what you want, the AI writes the code, you run it, and you nudge it until it works. You stay in the driver's seat on ideas; the AI handles the typing.
In this guide you'll vibe-code a small Kalshi trading bot (really, a market scanner and analysis script) that does two useful things:
Here's the fun hook: outcome rates are wildly uneven across categories. In the Kalshi history, Crypto markets resolve YES only about 26% of the time. That kind of pattern is exactly what a bot can explore. We'll feed your AI real data so it works from the actual numbers instead of guessing.
Time needed: about an afternoon, even if you've never shipped code before. Cost to start: zero, you test everything on free sample data first.
Head to the free key form on the homepage, drop in your email, and you'll get a key instantly. No credit card. The free tier is rate-limited sample access, which is perfect for learning and testing.
You'll send the key as a header called X-API-Key on every request. Keep it somewhere safe, like a note or a .env file, and don't paste it into public chats or commit it to a public repo.
This is where the magic happens. We'll wire the KalshiAPI MCP server into your assistant so it can query real markets while it builds with you. Pick your tool below.
The MCP endpoint is https://kalshiapi.com/mcp. Once connected, your AI gets these tools: dataset_stats, category_yes_rates, list_markets, get_market, get_candles, and get_trades.
Claude Desktop and Claude Code support MCP servers directly. Add this to your MCP config (in Claude Desktop: Settings, then Developer, then Edit Config), then restart Claude:
{
"mcpServers": {
"kalshiapi": {
"url": "https://kalshiapi.com/mcp",
"headers": { "X-API-Key": "YOUR_KEY" }
}
}
}
After restarting, ask Claude something like "list the kalshiapi tools you have" to confirm it connected. Now Claude can pull real Kalshi data on its own.
Now talk to your assistant like a teammate. If you connected MCP, it can answer these from real data immediately. Paste any of these to get going:
Keep it conversational. If the first answer isn't quite right, say "now only show markets closing this week" or "add the volume column." That back-and-forth is the whole vibe-coding loop: describe, run, refine.
Want to run something yourself right now? This ~15-line script uses the REST API and your free key. It lists a few markets, then pulls hourly candles for the first one. Save it as kalshi_bot.py, swap in your key, and run python kalshi_bot.py.
import requests
API = "https://kalshiapi.com"
HEADERS = {"X-API-Key": "YOUR_KEY"} # from kalshiapi.com/#freekey
# 1) Grab a handful of markets
markets = requests.get(f"{API}/v1/markets", headers=HEADERS,
params={"limit": 5}).json()
for m in markets.get("markets", []):
print(m.get("ticker"), "-", m.get("title"))
# 2) Pull hourly candles for the first market and flag the 50c line
ticker = markets["markets"][0]["ticker"]
candles = requests.get(f"{API}/v1/markets/{ticker}/candles",
headers=HEADERS).json()
for c in candles.get("candles", [])[:10]:
price = c.get("close")
flag = " <-- crossed 50c" if price and price >= 50 else ""
print(ticker, c.get("ts"), price, flag)
If you've never run Python: install it from python.org, then run pip install requests once in your terminal. If a field name doesn't match what comes back, paste the error to your AI and it'll fix it in seconds, that's vibe-coding too.
Build and test everything on the free sample tier first. Once your bot does something you like, you'll want more data to make it real:
When you're ready, the pricing page has a monthly API plan and a one-time full historical download. Same endpoints, just higher limits and the complete history.
That's the whole loop: free key, connect your AI, prompt it, run a tiny script, then scale up when it earns its keep. From here you could have your AI add alerts, score markets by category, or build a simple dashboard. Go build something fun.