Kalshi & Polymarket US Weather Bot: Temperature Markets in Paper Mode

KalshiPolymarket US Paper / demo first

PASS WITH FIXES Tested on Composer 2.5, , result: PASS WITH FIXES. We built this tracker from the prompt and ran it on live Kalshi weather markets, the Kalshi weather index and NWS forecasts, then scored it with settle.py. Kalshi demo orders were not run (paper log only): no real keys, orders or money. The prompt below includes the fixes from that run.

Short answer: Kalshi and Polymarket US temperature markets settle on official sources: Polymarket US uses the NWS Daily Climate Report from the local forecast office, and each Kalshi market names its source in rules_primary. This recipe builds a paper-mode bot that pulls the free NWS API plus Kalshi's public weather index and logs what your rule would do, measured against the settlement source.

What are the key facts?

  • Polymarket US temperature contracts settle on the official NWS Daily Climate Report (CLI) from the local forecast office, e.g. New York City = KNYC (Central Park), Chicago = KMDW (Midway). Settlement is 8:00 AM ET the next day (may slip to 11:00 AM ET for review).
  • Kalshi publishes a weather index behind its hourly temperature markets: GET /live_data/weather/{city} (e.g. miami), minute-resolution, °F rounded to 0.01. Public, no auth.
  • Kalshi market rules (rules_primary on GET /markets/{ticker}) name each market's exact source. Read them; don't assume they match Polymarket's.
  • Free forecast data: the US National Weather Service API at https://api.weather.gov (requires a User-Agent header identifying your app).
  • Paper mode: Kalshi demo for orders, a local ledger for Polymarket US.
DifficultyIntermediate
Time3 hours
Cost$0
Works withClaude Code, Cursor, ChatGPT / Codex, Grok

What will you build?

A paper-mode bot that tracks temperature markets for a city, pulls the relevant forecast and observations, and logs what your rule would do, measured against the official settlement source.

Who is it for?

Data-minded builders. Weather markets have public, official settlement data, which makes them great for learning to test a bot honestly.

Not for: Anyone who thinks a free forecast is an edge. Everyone else can read it too.

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 PAPER-MODE weather market tracker/bot in Python for one city.
Use only documented endpoints; ask me if unsure.

Data sources:
- Kalshi (public): GET https://external-api.kalshi.com/trade-api/v2/markets
  (filter by series_ticker or event_ticker that I put in config.toml),
  GET /markets/{ticker} (read rules_primary and *_dollars prices),
  GET /live_data/weather/{city}?last_sec=86400 (Kalshi weather index, °F).
- Polymarket US (public): GET https://gateway.polymarket.us/v1/search
  ?query=<city> temperature, then GET /v1/markets/{slug}/bbo.
- NWS: https://api.weather.gov (send a User-Agent header with my app name and
  email from config). Use /points/{lat},{lon} to find the forecast URL, then
  fetch the forecast.

Logic:
- For each tracked market, store: market id, threshold/condition parsed
  from the market text (show me the parse; if unsure, mark "needs review"),
  handling Kalshi title formats such as "Will the maximum temperature be
  >67° on Oct 19, 2026?" (no F after the degree sign) as well as "above 88F";
  write a parse_threshold test for each format,
  current YES bid/ask, latest forecast, latest observed index value.
- strategy.py: MY placeholder rule using a configurable margin between my
  own probability estimate and the market price. Keep it explainable.
- risk.py: limits.json + KILL file, same as the BotCookery Safety Pack.
- Paper execution: Kalshi -> optionally place orders on the DEMO exchange
  (https://external-api.demo.kalshi.co/trade-api/v2, POST
  /portfolio/events/orders, demo keys from env); Polymarket US -> local
  paper ledger only (simulate at the ask, limited by displayed size).
- settle.py: the next day, record the official result I enter (or that
  the market shows as settled) and score each paper decision. Brier score
  for my probability estimates.
- Log everything to logs/. Tests for parsing and scoring.

Show the plan first.

How do you build it, step by step?

  1. Pick one city that both venues list (check Polymarket US's Weather FAQ table and Kalshi's markets). Note each venue's settlement source for it.
  2. Read the rules. For each market, read rules_primary (Kalshi) and the market description (Polymarket US). Write down the station, the report, the time window and how ties are handled.
  3. Paste the prompt in a fresh folder with the Safety Pack. Set your NWS User-Agent (app name + email) in config.
  4. Check the parser. The bot must correctly read each market's threshold. Kalshi titles look like Will the maximum temperature be >67° on Oct 19, 2026?, often with no F after the degree sign, so make sure there's a test for that form. Anything it isn't sure about is "needs review" and never traded, even on paper.
  5. Run daily for 2–4 weeks in paper mode. Run settle.py each morning after settlement.
  6. Look at your Brier score and paper PnL after fees. If your estimates aren't clearly better calibrated than the market's prices, you have your answer.

How do you test it in paper or demo mode first?

  • Kalshi: optional orders on the demo exchange (mock funds, separate keys). Weather markets on demo may not mirror production prices, so score your estimates against real outcomes rather than trusting demo PnL.
  • Polymarket US: local paper ledger simulating fills at the ask with displayed size.
  • Scoring: log every probability you estimate and compute a Brier score against outcomes. That's the honest test of whether the model behind your rule is any good.

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.

Which official docs did we check?

Endpoints and rules were checked against these pages on Oct 19, 2026. APIs change, so if something here disagrees with the official docs, trust the docs and tell us.

Frequently asked questions

How are Polymarket US weather markets settled?

According to Polymarket US's Weather FAQ, temperature contracts settle on the official NWS Daily Climate Report (CLI) from the local Weather Forecast Office, for a named station (for example KNYC Central Park for New York City). Settlement happens at 8:00 AM ET the next day, possibly delayed to 11:00 AM ET for review.

Does Kalshi have a weather API?

Kalshi's API includes a weather index endpoint, GET /live_data/weather/{city}, that returns the minute-resolution temperature index behind its hourly temperature markets, in Fahrenheit. Check each market's rules for its exact settlement source.

Is a weather bot profitable?

We don't know, and nobody can promise it. Forecasts are public, so markets often price them in. A paper-mode bot with honest scoring is how you find out for yourself without risking money.

Related recipes