Verified working on live data in read-only mode, Nov 11, 2026. Ran read-only against the live Kalshi and Polymarket US public APIs on the morning of Nov 11 for several minutes on three hand-mapped NBA game pairs, plus fault drills through a local fault-injection server. No gap survived fees, so the alert path was tested with a forced margin, and Telegram was tested only against a local test server, not real Telegram. No keys, no orders.
Short answer:A Polymarket–Kalshi arbitrage only exists if YES on one venue plus NO on the other costs less than $1.00 after fees, and both contracts settle on exactly the same outcome. Both conditions are rarer than bot sellers claim. This recipe builds an alerts-only monitor for market pairs you map by hand. It never places orders.
The idea: if YES on venue A plus NO on venue B costs less than $1.00 after fees, and both contracts settle on the exact same outcome, the pair locks in a gain. Both conditions are harder than they look.
Contract rules differ. On Oct 25, Kalshi's Miami high-temperature markets settled on The Weather Company and Polymarket US's on the National Weather Service report. Same city, same day, same bucket, and still not a pair. Read rules_primary, rules_secondary and the series settlement_sources on Kalshi and the market description on Polymarket US for every pair.
Kalshi public data: GET /markets/{ticker}/orderbook is bids only, sorted ascending, so the best bid is the last element. The YES ask is $1 minus the best NO bid. Each series' fee multiplier is on GET /series/{series_ticker}.
Polymarket US public data: GET https://gateway.polymarket.us/v1/markets/{slug}/book. The long side is the YES side. Take sizes from /book: the askDepth and bidDepth in /bbo aren't contract counts.
Fees: Kalshi taker = 0.07 × C × P × (1−P) × the series multiplier, rounded up. Polymarket US taker = Θ × C × p × (1−p), rounded to the cent. From Nov 21 to Dec 31, 2026, taker trades placed through the API pay Θ 0.0695 at any volume, with 70% of those fees rebated by Polymarket; in the app Θ depends on your 30-day taker volume: 0.11 under $10,000, 0.10 to $50,000, 0.09 to $250,000, 0.0695 at $250,000+ (raised Nov 25, 2026). On Nov 11 every pair we watched cost at least $1.00 before fees.
Kalshi's Developer Agreement: data only for your own trading. Keep alerts private. No public arb dashboards or paid alert channels.
DifficultyIntermediate
Time2–3 hours
Cost$0
Works withClaude Code, Cursor, ChatGPT / Codex, Grok
What will you build?
A local script that watches market pairs you map by hand (one Kalshi ticker ↔ one Polymarket US slug), computes the combined cost of opposite sides after fees, and alerts you when it's under $1.00 by your margin. It never places orders.
Who is it for?
Curious traders who keep seeing "risk-free arbitrage bot" videos and want to measure how often real, tradable gaps actually show up.
Not for:Anyone expecting free money. Most apparent gaps disappear once you count fees, depth, timing and differences in contract rules.
What happened when we rebuilt it from this prompt
We rebuilt this from the published prompt again on Nov 11, 2026, by hand in a clean folder, and ran it read-only on three of that night's NBA games: Celtics at Raptors, Cavaliers at Knicks and Thunder at Trail Blazers. Both venues' rules for these games now line up closely: overtime counts on both, and a game not played within 48 hours (Kalshi) or two days (Polymarket US) goes to a fair price. Kalshi's wording is "a fair price"; Polymarket US says "the last fair market price". Whether that's close enough is your call; we marked the pairs as matching for the test.
What the Nov 11 run found
The Polymarket US fee in the prompt was out of date. Polymarket US charges takers by tier (schedule effective Nov 14, 2026; the API already returned the tier rate on Nov 11): Θ = 0.095 below $10,000 of trailing 30-day taker volume, 0.085 to $50,000, 0.075 to $250,000 and 0.0695 only above that (or in an account's first 7 days). The old prompt hard-coded 0.0695, the top tier. Every market we read returned feeCoefficient: 0.095. On 10 Knicks contracts at $0.63 that's a $0.22 fee, not $0.16, and the best edge of the morning went from −3.3¢ to −3.9¢ a contract.
No gap. Over two runs (8 cycles of 3 pairs, 9:01–9:05 AM ET, then again with the fixes) the cheapest pair cost exactly $1.00 before fees: Kalshi NO on the Knicks at $0.37 plus the Polymarket US short side at $0.63. Prices didn't move during either run; tip-off was hours away.
Output to a file was empty until the script exited. Redirected to a file, the first build wrote 0 bytes for four minutes, then all 48 lines at once. Piped into head, nothing showed until the run ended.
Errors weren't retried or explained. A 503 or a dropped connection failed the pair on the first try. A 429 waited 1, 2, 4 and 8 seconds and ignored Retry-After. An HTML page with status 200 printed Expecting value: line 1 column 1 (char 0), with no venue named.
A finished market looked like changed rules. Last night's finalized Clippers–Suns ticker was reported as "live rules hash … != saved", because the hash check ran before the status check. Polymarket US just returns 404 for a finished game's slug.
A failed Telegram send was silent. Against a local test server that answered 401, the first build logged nothing. Ctrl-C ended in a KeyboardInterrupt traceback.
The math, book walking, 403 host fallback, alert-once logic and rules fingerprint all worked. A grep for /orders finds nothing.
After the fixes, same pairs, 10 contracts, Tier 1 fees (Nov 11, 9:06 AM ET):
Kalshi https://external-api.kalshi.com/trade-api/v2 answered 403; switching to https://api.elections.kalshi.com/trade-api/v2
Celtics @ Raptors, Nov 11 (Boston wins) [K NO + PM long] x10: K 0.3000 fee $0.15 | PM 0.7100 fee $0.20 | edge -0.0450/contract rules_match=True
Cavaliers @ Knicks, Nov 11 (New York wins) [K NO + PM short] x10: K 0.3700 fee $0.17 | PM 0.6300 fee $0.22 | edge -0.0390/contract rules_match=True
Thunder @ Trail Blazers, Nov 11 (Oklahoma City wins) [K NO + PM long] x10: K 0.4800 fee $0.18 | PM 0.5200 fee $0.24 | edge -0.0420/contract rules_match=True
Fault drills through a local proxy, after the fixes:
ERROR Celtics @ Raptors, Nov 11 (Boston wins): Kalshi /trade-api/v2/markets/KXNBAGAME-26NOV11BOSTOR-BOS: HTTP 429 (waited 5s) after 3 tries
ERROR Celtics @ Raptors, Nov 11 (Boston wins): Polymarket US /v1/market/slug/aec-nba-bos-tor-2026-11-11: HTTP 200, not JSON: '<html>Maintenance</html>'
ERROR closed market: Polymarket US /v1/market/slug/aec-nba-lac-phx-2026-11-10: 404 not found (wrong slug, or the market is finished)
SKIP closed kalshi: Kalshi status finalized
SKIP hash drill: live rules hash fb253222222a9eff != saved 0000000000000000; re-read with --show-rules
Stopped (Ctrl-C).
Update, Nov 23, 2026: the fee finding above was right on Nov 11. Since 12:01 AM ET on Nov 21, 2026 (through Dec 31, 2026), Polymarket US charges every taker trade placed through the API Θ = 0.0695 at any volume and rebates 70% of those fees on straight trades (fee docs). The tiers still apply to trades placed in the app. The prompts below now default to 0.0695 for an API leg and leave the rebate out of the edge, which keeps alerts conservative.
Update, Nov 27, 2026: Polymarket US raised its app and website taker tiers at 9:45 PM ET on Wednesday, Nov 25, 2026: Θ is now 0.11 under $10,000 of trailing 30-day taker volume, 0.10 to $50,000, 0.09 to $250,000 and 0.0695 above (it was 0.095, 0.085, 0.075 and 0.0695) (fee docs). The API rate is unchanged: 0.0695 at any volume with 70% rebated, through Dec 31, 2026. The prompts below use the new tiers. The Nov 11 finding above is unchanged and used the old 0.095 tier; at 0.11, 10 contracts at $0.63 in the app would pay $0.26.
With a forced margin of −0.04, the Knicks combo alerted once over three cycles, wrote one line to logs/alerts.jsonl and sent one message to a local test server posing as Telegram ("telegram sent"). Against a 401 it logged telegram failed: HTTP 401. Nothing went to real Telegram.
Built this before Nov 11? Paste this follow-up into the same project:
Update my alerts-only arbitrage monitor. Still no order code; public reads only.
1. Polymarket US taker fees: from Nov 21 to Dec 31, 2026, taker trades
placed through the API pay coefficient 0.0695 at any volume, and
Polymarket rebates 70% of those fees (leave the rebate out of the
edge). App trades are tiered: 0.11 below $10k trailing 30-day taker
volume, 0.10 to $50k, 0.09 to $250k, 0.0695 above. Set
polymarket_us_taker_coef in fees.yaml, default 0.0695 (API); set my
app tier instead if I'd place the leg in the app. Each PM market also
returns feeCoefficient (the app base tier); note once per pair if it
differs from fees.yaml. Kalshi stays fee_multiplier x 0.07 x C x P x (1-P),
rounded up.
2. One HTTP helper for both venues: timeout 10 s; on 429 wait Retry-After
(cap 30 s, else 1, 2, 4 s backoff); retry 5xx, timeouts and dropped
connections up to 3 tries; a 200 that isn't JSON is an error. Errors are
one line naming the venue, path and reason, then move to the next pair.
3. Skip order: market status before the rules hash, so a closed market
says "Kalshi status finalized", not "rules changed". A 404 from Polymarket
US /v1/market/slug means wrong slug or the market is finished (finished
games drop off that endpoint).
4. Line-buffer stdout (every line shows up live in a file or pipe). Ctrl-C
prints "Stopped (Ctrl-C)." with no traceback; a closed pipe (| head)
exits quietly.
5. Telegram: TELEGRAM_API env var overrides https://api.telegram.org (for a
local test). Check the response; log "telegram failed: <status>" if it
isn't ok. Never let a failed send stop the loop.
6. Tests for each of the above, including Retry-After and non-JSON 200.
Earlier: the Oct 25 rebuild
On Oct 25 we ran the Oct 22 prompt on an NBA game, an NFL game and a Miami temperature bucket and found: Kalshi's recommended host answered 403 from our network (now it falls back to api.elections.kalshi.com); flat placeholder fees made a Miami pair at $0.98 look break-even when real fees made it lose 1.4¢ a contract; depth meant the top level only; free-text notes let through a pair whose rules differed (Kalshi's Miami temperature settles on The Weather Company, Polymarket US's on the NWS climate report); gaps re-alerted every cycle; and output was buffered. That pass added real fee formulas, the book walk, rules_match plus a rules fingerprint, and alert-once with a "closed" line:
ALERT Miami high Oct 26, 83-84F [K NO + PM long] x12: K 0.3800 fee $0.20 | PM 0.6008 fee $0.20 | edge -0.0142/contract
CLOSED Miami high Oct 26, 83-84F [K NO + PM long] after 73s, best edge -0.0142 (edge -0.0242)
Built this before Oct 25? Apply this follow-up first, then the Nov 11 one above:
Update my alerts-only arbitrage monitor with these fixes. Still no order
code of any kind; public reads only.
1. Kalshi host: try https://external-api.kalshi.com/trade-api/v2 first;
on a 403, switch once to https://api.elections.kalshi.com/trade-api/v2
and keep it. KALSHI_BASE still overrides both.
2. Check the Kalshi book math: arrays are bids sorted ASCENDING, so the
best bid is the LAST element. YES ask = 1 - last NO bid, NO ask =
1 - last YES bid. Taking the first element gives a $0.99 ask.
3. Replace the placeholder fees with the real formulas, computed per leg
for the size you'd trade:
Kalshi taker = fee_multiplier x 0.07 x C x P x (1-P), rounded UP to
the cent (fee_multiplier from GET /series/{series_ticker}).
Polymarket US taker = polymarket_us_taker_coef x C x p x (1-p),
banker's rounding to the cent. Keep the coefficients in fees.yaml with a checked_on date and
warn if it's older than 30 days.
4. Price min_size contracts by walking each book across levels
(volume-weighted). If either side can't fill it, log "too thin".
Take sizes from /book; /bbo askDepth and bidDepth are not sizes.
5. Add kalshi_source, polymarket_source, tie_and_delay, rules_match
(default false) and rules_hash to each pair. Add --show-rules to print
Kalshi rules_primary + rules_secondary + series settlement_sources
next to the Polymarket US description, with a sha256 of both. Skip a
pair unless rules_match is true and the live hash equals rules_hash.
6. Alert once when a gap opens; log a "closed" line with how many
seconds it lasted and its best edge. Print with flush=True.
7. Tests for each of the above.
What prompt do you paste into your AI coding tool?
Works in Claude Code, Cursor, Codex/ChatGPT, Grok or any agent that can write files. Paste it into an empty folder. Read what it builds before you run anything.
Build a personal, ALERTS-ONLY cross-venue price monitor in Python.
It must never place, preview or cancel orders. No API keys are needed.
Use only documented public endpoints:
- Kalshi: https://external-api.kalshi.com/trade-api/v2 (recommended).
If it answers 403, retry the same path once on
https://api.elections.kalshi.com/trade-api/v2 (also documented) and
keep using whichever works. Let KALSHI_BASE override both.
GET /markets/{ticker} (status, rules_primary, rules_secondary,
close_time, event_ticker)
GET /markets/{ticker}/orderbook -> orderbook_fp.yes_dollars /
no_dollars: BIDS ONLY, [price, size] pairs sorted ASCENDING, so the
best bid is the LAST element. YES ask = 1 - best NO bid (size = that
NO bid's size) and vice versa. Sizes can be fractional.
GET /series/{series_ticker} -> fee_multiplier, settlement_sources
- Polymarket US: https://gateway.polymarket.us
GET /v1/market/slug/{slug} (description, marketSides: the side with
"long": true is the YES/long side; read its description or team)
GET /v1/markets/{slug}/book -> marketData.bids / offers
([{px:{value}, qty}], state). Prices can use 0.0025 ticks; qty can
be fractional. In /bbo, askDepth/bidDepth are NOT contract sizes;
take sizes from /book.
The cost to buy the short side is 1 - best long bid.
pairs.yaml (I fill it in by hand; do NOT auto-match markets):
- name: "..."
kalshi_ticker: "..."
polymarket_slug: "..."
same_outcome: "yes_yes" # or "yes_no" if Kalshi YES = PM short
kalshi_source: "..." # who decides the result on Kalshi
polymarket_source: "..."
tie_and_delay: "..." # each venue's tie/postponement rule
rules_match: false # I set true only if all of it matches
rules_checked_on: "YYYY-MM-DD"
rules_hash: "" # filled by --show-rules
monitor.py:
- `--show-rules`: for each pair print Kalshi rules_primary +
rules_secondary + series settlement_sources and the PM description,
side by side, with one sha256 of the combined text. I paste the hash
into rules_hash after reading both.
- Each cycle (default every 30 s), skip a pair and log why (never alert),
checking in this order: rules_match is not true; rules_checked_on is
over 14 days old; Kalshi status is not "active" (say which status);
the live rules hash differs from rules_hash (the rules changed);
PM state is not MARKET_STATE_OPEN; either leg has no ask. A missing ask
is "no price", never 0. A 404 from PM /v1/market/slug means a wrong slug
or a finished market (finished games drop off that endpoint).
- For both opposite-leg combos, walk each book to fill min_size
contracts (volume-weighted, not just the top level). If the books
can't fill min_size, log "too thin" with the size available.
- Fees per leg for that size, from the official pages:
Kalshi taker = fee_multiplier x 0.07 x C x P x (1-P), rounded UP to
the cent (conservative; kalshi.com/docs/kalshi-fee-schedule.pdf).
Polymarket US taker = theta x C x p x (1-p), banker's rounding to the
cent (docs.polymarket.us/fees). From Nov 21 to Dec 31, 2026, taker
trades placed through the API pay theta 0.0695 at any volume, and
Polymarket rebates 70% of those fees; leave the rebate out of the edge.
In the app theta is tiered by MY trailing 30-day taker volume: 0.11
under $10k, 0.10 to $50k, 0.09 to $250k, 0.0695 above. Default 0.0695
(API). Each PM market also returns feeCoefficient (the app base tier);
note it once per pair if it differs from fees.yaml. Put both coefficients in fees.yaml with a checked_on
date; warn loudly if it's older than 30 days.
- edge per contract = 1 - (cost + fees) / C. Print one line per combo:
both prices, both fees, edge, size, and whether rules_match is set.
- Alert when edge >= margin. Alert ONCE when a gap opens, then log a
"closed" line with how many seconds it lasted and the best edge seen.
Alerts go to stdout (unbuffered), logs/alerts.jsonl and optionally a
desktop notification or a Telegram message to MY OWN chat (token and
chat id from env vars; off unless both are set; TELEGRAM_API overrides
https://api.telegram.org for a local test). Check Telegram's reply and
log "telegram failed: <status>" if it isn't ok; never stop the loop.
- One HTTP helper for both venues: about 2 requests/second per venue,
timeout 10 s; on 429 wait Retry-After (cap 30 s, else 1, 2, 4 s);
retry 5xx, timeouts and dropped connections up to 3 tries; a 200 that
isn't JSON is an error. Each error is ONE line naming the venue, path
and reason; then move on to the next pair.
- Line-buffer stdout so lines appear live in a file or pipe. Ctrl-C
prints "Stopped (Ctrl-C)." with no traceback; a closed pipe exits quietly.
- README: for my own trading only; never share or publish the data.
- tests: Kalshi best bid = last element; PM short = 1 - long bid; book
walk across levels; both fee formulas incl. rounding and the 0.0695
default; yes_no mapping; a changed rules hash skips the pair;
Retry-After is honored; a non-JSON 200 is a one-line error.
Show the plan, build, then tell me how to run it.
How do you build it, step by step?
Find candidate pairs by hand. Search each venue for the same event: Kalshi GET /markets?series_ticker=...&status=open (for example KXNBAGAME), Polymarket US GET /v1/search?query=.... Note which side is "long" on Polymarket US; in a game market it's one of the teams, so you may need yes_no.
Paste the prompt, add your pairs to pairs.yaml with rules_match: false, and run python monitor.py --show-rules.
Read both rulebooks in that output. Compare who decides the result, the cutoff time, and what happens on ties, delays or cancellations. If anything differs, leave rules_match: false; it isn't a pair. If it all matches, set it to true and paste the printed rules_hash.
Check fees.yaml against both fee pages and update checked_on. Set the Polymarket US coefficient to 0.0695 if you'd place that leg through the API (Nov 21 to Dec 31, 2026; Polymarket rebates 70% of it, which the monitor leaves out), or to your app taker tier (0.11 unless you trade $10,000+ a month) if you'd place it in the app, and check Kalshi's GET /events/fee_changes for overrides on your events (none were listed on Nov 11). Then run it for a week with python monitor.py and keep logs/alerts.jsonl.
Review honestly. How many alerts? How big? How deep? How long did each last? That data is the real answer to "do arbitrage bots work?"
If you ever act on an alert, do it by hand, with the Safety Pack limits in mind, on venues you're eligible to use.
How do you test it in paper or demo mode first?
This recipe is alerts-only, so it's paper by design. The monitor already prices the size you'd trade, including fees, and logs how many seconds each gap stayed open. To make it harsher, re-price the second leg from the next snapshot, as if you hit the legs 2–5 seconds apart. On Oct 25 the best Polymarket US offer in our Miami pair was mostly gone within a few minutes; on the morning of Nov 11 the NBA books didn't move at all, so run it close to game time too.
Review logs/alerts.jsonl after a week: how many gaps opened, how big after fees, how deep, and how long each lasted. That's your evidence for or against building anything automated.
The two books are shaped differently (Kalshi lists bids only; Polymarket lists bids and asks) and the fees use different coefficients and rounding. The Kalshi vs Polymarket API comparison puts them side by side.
What safety checks does it need before real money?
Tick every box before the bot touches real money. The full rules file, .gitignore and pre-commit hook are in the Safety Pack.
Key handling: API keys and private-key files live in environment variables or a secrets manager. Never in code, prompts, chat logs, screenshots or git. .env and *.pem are in .gitignore, and your AI tool is blocked from reading them (see the Safety Pack).
Position limits: hard caps in config (max contracts per order, max total exposure, max daily loss). The bot refuses any order above them, and the caps are checked in code, not just in the prompt.
Kill switch: one command or one file (touch KILL) stops new orders immediately, and a second command cancels every resting order through the venue's cancel-all endpoint.
Paper first: paper or demo mode is the default. Live trading needs an explicit --live flag and a typed confirmation, and you only flip it after days of clean paper logs.
No order code at all. Grep for /orders and /order/; there should be zero hits.
Pairs are mapped by you, with the rules read and dated. Never auto-match by title.
A pair only counts when rules_match is true and the saved rules fingerprint still matches. Venues edit rules; the fingerprint makes the monitor stop until you re-read them.
Telegram alerts go to your own chat only, and only when both env vars are set.
Keep alerts private. Kalshi's Developer Agreement bars sharing API data with third parties without written permission.
Don't use international Polymarket from the US to "complete" a pair. It's close-only for US users.
Endpoints and rules were checked against these pages on Nov 27, 2026. APIs change, so if something here disagrees with the official docs, trust the docs and tell us.
Frequently asked questions
Do Polymarket–Kalshi arbitrage bots actually work?
Sometimes prices for similar events differ, but real, tradable arbitrage is rarer than videos suggest. Fees, thin depth, the delay between legs, and small differences in how each contract resolves wipe out most apparent gaps. Measure it with an alerts-only monitor before believing it.
Do the same event's markets on Kalshi and Polymarket US settle the same way?
Not always. When we checked on Oct 25, Kalshi's Miami daily-high markets settled on The Weather Company's reading and Polymarket US's on the National Weather Service report. The two can differ by a degree, and one degree moves a bucket. NFL game markets on both venues paid $0.50 on a tie, but handled postponements differently. Read both rulebooks for every pair.
Is arbitrage between Kalshi and Polymarket legal?
Trading the same event on two venues you're eligible to use isn't inherently prohibited, but you must follow each venue's rules and your local laws. US users should only use Kalshi and Polymarket US. This isn't legal advice.
Why does my arbitrage math look risk-free when it isn't?
The usual causes are ignoring fees, assuming fills at the best price for more size than exists, assuming both legs fill at the same instant, and treating markets with different resolution rules as identical.
Can I share arbitrage alerts in a Discord or sell them?
Not with Kalshi data. Kalshi's Developer Agreement limits API data to your own trading and bars sharing it with third parties without written authorization.
Get new recipes by email
When we publish a new bot recipe, we'll send it to you. Free. No picks, no signals, ever.
A copy-paste AI prompt and step-by-step guide to the Polymarket US API: public market data with no key, then authenticated reads. Includes the international Gamma API, read-only, with a geoblock check.
Build a read-only Kalshi API client and CLI with an AI coding tool: live markets, order books with implied asks and spreads, recent trades, a multi-cycle watch command, and correctly signed RSA-PSS or Ed25519 requests. Rebuilt and run against live data on Nov 4, 2026.
Build a personal Telegram bot that pings you when a Polymarket US market crosses your price levels or moves fast. Public data only, no API key, no trading, no wallet.
Step-by-step: use Claude Code to build a Polymarket US trading bot that runs in paper mode by default, with a local paper ledger, order preview, hard position limits and a kill switch.