This is the most-asked question in our inbox right now: how do I hook a bot up to Kalshi? Then Polymarket US. Then Novig. Then ProphetX.
So here's all of it. One page per venue with the exact steps, a prompt you can paste into Claude or ChatGPT to write the bot, and how to fund it without putting your whole account on the line. At the bottom, how we run ours.
The venue guides
Every guide follows the same four steps: connect (API keys), build (the AI prompt), fund (a capped balance), and start (where the signals come from).
- Kalshi trading bot setup β The deepest API and the one most people start on. Our public BTC 15-minute bot runs here.
- Polymarket US trading bot setup β The US exchange, with an official TypeScript SDK and 5- and 15-minute crypto windows.
- Novig trading bot setup β A sports exchange with real subaccounts, which is the cleanest way to cap what a bot can touch.
- ProphetX trading bot setup β A sports exchange with a free sandbox and demo funds, so you can break things before real money is involved.
Every bot is three jobs
Strip any trading bot down and it does three things. Keep them separate, even when they live in one file, and debugging gets easy.
- Ingest. Read prices. Order books, last trades, and whatever outside number the market settles on (the Bitcoin index for a crypto window, a box score for a player prop).
- Math. Turn those prices into a decision. Fair value versus the market price, an edge, a size. This is where your rule lives.
- Trade. Place the order the math recommended, and nothing else. It enforces your caps, logs every order and every skip, and stops when you tell it to.
Most bots that blow up fail in job 3, not job 2. The rule was fine. The bot just had no cap, no daily stop, and no log, so nobody noticed it was buying the same contract forty times.
Step 1: connect
Each venue gives you an API key: a public ID plus a private key that signs your requests. The private half is the dangerous part. Whoever holds it can trade your account.
Three rules for every venue:
- Download the private key once and store it like a password. Password manager, or an
.envfile on your own machine. Kalshi, for one, never shows it again after the page closes. - Never paste it into an AI chat, a Discord, a screenshot or a GitHub repo. Have the AI write code that reads the key from your machine.
- Use the official API. Every venue on this page publishes one. Screen-scraping or clicking buttons with a browser script is how accounts get closed.
Step 2: build it with AI
You don't need to be a developer anymore, but you do need to be the boss. Paste this into Claude or ChatGPT, fill in the brackets, and it will write a working dry-run bot. Each venue guide has a version with that venue's auth and endpoints already filled in.
You are a senior engineer helping me build a small, safe trading bot for [VENUE].
Goal: a bot that reads prices for [MARKET, e.g. Bitcoin 15-minute up/down windows],
decides with this rule: [YOUR RULE IN ONE OR TWO SENTENCES],
and places limit orders only when the rule fires.
Hard requirements:
1. Language: [Python 3.12 / Node 24]. One folder, a README, and a requirements or package file.
No axios. Use the standard library or the venue's official SDK.
2. Read the API key ID and private key from environment variables or a local file path.
Never print them, never log them, never ask me to paste them into this chat.
3. Three separate modules: ingest (prices), decide (my rule), execute (orders).
4. DRY_RUN=true by default. In dry-run, log the order it would place and place nothing.
5. Risk rails in a config file: max dollars per position, max open positions,
daily loss stop, and a KILL file that stops all trading if it exists.
6. Log every decision to a CSV: timestamp, market, price seen, decision, reason, order id.
7. Handle rate limits and reconnects with backoff. If data is stale, do nothing.
8. Use the official [VENUE] API docs: [DOCS URL]. If you are unsure of an endpoint,
say so and tell me where in the docs to check. Do not invent endpoints.
Start by listing the files you will create, then write them one at a time.
After the code, give me a test plan: how to run dry-run and what the log should show.
Two habits that save money. Ask the AI to explain every line of the execute module back to you before you arm it. And make it write tests for the risk rails, because those are the lines that matter most when something goes wrong.
Step 3: fund it and fence it
Fund the bot like you expect it to have a bad week, because it will.
- Separate the money. Novig lets you open a subaccount with its own trading key, so the bot physically cannot reach the rest. On venues without that, keep the bot's balance small and keep the rest somewhere it can't trade.
- Cap everything in code. Max per position, max per day, max lifetime loss. Our live lanes start at a few dollars per position with a daily stop, and they only get bigger after the log earns it.
- Dry-run first, small live second. Run dry until the log reads exactly like your own judgment. Then arm it at minimum size. Then wait a week.
- Know your fees. A thin edge minus fees is often a loss. Kalshi charges a per-contract fee on every fill, and our Kalshi fee calculator shows what it does to a small edge. We tested three common 15-minute bot ideas against the fees, and two of them lost.
Step 4: where the signals come from
A bot is only as good as its rule. If you don't have one yet, start with what we publish:
- Bitcoin Edge: the hourly Kalshi Bitcoin read, model price against market price.
- Bitcoin Edge 15-Minute: the directional read on Kalshi's BTC 15-minute windows.
- Kalshi 15-minute markets and the Polymarket US 15-minute Bitcoin board: the same window on both venues.
- Polymarket US 5-minute Bitcoin board: every 5-minute window, settled and graded.
- BTC 15-minute venue pairs: the same 15 minutes priced on both venues, side by side.
- Edge Alerts API: the same signals as JSON for your bot. Pro gets it in real time, and the /alerts page shows it 24 hours delayed for free. Our open-source executor is in the Kalshi alerts API guide.
Copy our setup (Pro)
Everything above gets you a bot. What follows is how we run ours, and it sits behind Pro.
People keep asking how ours is wired, so we wrote it down. The Bot Playbook is the build sheet for the setup we actually run:
- Machine 1, the ingester. It runs on a small Fly.io server around the clock, streams the order books and the settlement index, and writes fresh prices to the database. It includes the freshness checks that keep a frozen feed from trading.
- Machine 2, the math. It reads those prices, computes fair value and the edge, and writes one signal row. That same row feeds our public tools, so what the site shows and what the bot trades never drift apart.
- Machine 3, the executor. It reads the signal and places only the trades the math recommended, with per-position caps, a daily stop, a lifetime stop, a one-row kill switch, and a ledger that logs every order and every skip with its reason.
- The wiring sheet: the table layout, the process list, how the three talk to each other, the alerting, and what it all costs per month to run.
- The AI prompts we use to stand each piece up, in order.
It's the plumbing, not the rules. The edges change and the rules change with them. This version of the strategy stays until it breaks. The plumbing doesn't change.
Building a bot? Get the week's prediction-market edges by email, every week. Free.
No spam. Unsubscribe anytime.
The honest part
Most bots lose. Fees eat small edges, everyone reading the same public signal crowds the same thin book, and a rule that worked for three weeks can quit without warning. That's why we start small, log everything, and cut lanes that stop earning. Trade responsibly, and never automate money you need.
