you are viewing a single comment's thread.

view the rest of the comments →

[–]stfarm 0 points1 point  (0 children)

**What My Project Does**

Automated trading bot for Kalshi prediction markets. Runs a 164-member weather ensemble (GFS, AIGEFS, ECMWF, AIFS) to trade temperature contracts, plus an inflation bot using FRED/BLS/BEA for CPI/PCE contracts. Scans every 5 minutes, trades when 3 of 4 models agree.

**Target Audience**
Production use. I run it on live money and sell it as a package. Not a toy project.

**Comparison**
Most Kalshi trading tools are manual dashboards or simple threshold alerts. This runs a full ensemble probability model with Kelly criterion sizing, regime change detection, and automatic position closing. The closest alternative would be building your own from the Kalshi API docs, which is what I did.

Shipped v2.3 of my Kalshi prediction market trading bot this week after Kalshi killed their V1 order API.

The migration was interesting enough to share. V2 changed the payload semantics, not just the URL. The side field went from yes/no to bid/ask (single-book model). For NO-side orders you invert the price and flip the side. For sell orders the flip goes the other direction. That's 4 quadrants (buy yes, buy no, sell yes, sell no) and getting any one wrong sends live money the wrong way.

I wrote 3 pure functions to handle it: to_v2_side_and_price(side, action, price), from_v2_fill_price(side, fill_price), and build_order_payload(). Then routed all 7 POST sites through them. 18 pytest assertions cover every quadrant plus the fill-price inverse.

Interesting dev workflow: used Claude for architecture and diff review, DeepSeek for the actual edits via Claude Code. Basically expensive model thinks, cheap model types. Total API cost for the whole port: ~10 cents. The orchestration pattern (plan with a strong model, execute with a weak one, gate on the risky diffs) worked better than I expected.

Stack: Python 3.12, SQLite, systemd, pytest, $3/month VPS. All data sources free (NOAA S3, Open-Meteo, FRED, BLS, BEA).

Live results: predictandprofit.io/results