Files
Kalshi_Polymarket/scripts
Casey Judice 4656a23ef4 Add month-rollover tool to regenerate pairs.json from live markets
The monthly scanner is driven by a static curated pairs.json, so new monthly
contracts don't appear until that file is rebuilt. roll_month.py discovers both
legs live for a target month: it anchors on Kalshi's full strike ladder
(series KX{ASSET}MAX/MINMON, target expiry code) and attaches each strike's
nearest same-direction Polymarket market (events forward-parsed; HYPE probed).
Validated against May: re-discovers 100% of curated tickers, all slugs parse,
nearest-match agrees except where the curated file points at now-closed Poly
markets. Safety: backs up the prior file and refuses to overwrite when it finds
fewer than --min-pairs (so running it before the month lists can't wipe it).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 12:04:42 -04:00
..