Teams often play the same opponent on back-to-back days, so rows like
"Colorado Rockies to beat Chicago White Sox" were ambiguous. Names now
include the Eastern game date and keep the original team names (aliases are
only used for matching).
Add sports/esports game matching and resolve-time filter
AJAY KASU
26a2b4f
Near-term overlap between the venues is mostly game winners, which Polymarket
lists as two-team moneylines (not Yes/No) and Kalshi as one market per team.
- Fetch Polymarket moneylines day by day (Gamma caps offsets at ~2,100) and
Kalshi game series directly (the events listing omits many of them)
- Pair games on league + Eastern date + both teams; same-day first so series
games on back-to-back days stay unambiguous; NFL/NHL nickname aliases
- Leagues without draws only: MLB, NFL, CFB, NHL, NBA, WNBA, KBO, CS2, LoL,
Valorant, Dota 2, R6
- Track each pair's resolution time and whether the game is in progress
- App: "Resolves within" filter (today / week / month / any), optional
in-progress games, annualized return column, sort by annualized return
Merge Space history: microstructure study + curated market pairs
AJAY KASU
71e881a
Combines the Space's hand-verified CURATED_PAIRS scanner fix with the
auto-matching live scanner. Curated pairs are fetched by conditionId and
always included as verified matches; auto-matching fills in everything
else. Keeps the Kalshi tick collector and microstructure study pipeline.
Fix live scanner: auto-match all markets, YES+NO arbitrage, real order-book depth
AJAY KASU
0773962
The live scan could never report an opportunity:
- scan_opportunities() read market_mappings while app.py filled market_map
- Polymarket outcomePrices is a JSON string, so float() always failed
- Kalshi v2 now returns *_dollars string fields instead of integer cents
Moves fetching/matching into src/live_scan.py:
- Polymarket: paginate Gamma (capped at 100/request), Yes/No markets only,
real top-of-book depth from the CLOB for matched markets
- Kalshi: walk all open events with nested markets instead of the flat
listing, which is dominated by sports props
- IDF-weighted token matching; numbers and outcome-defining words must agree
so "win" vs "run for" or "at least 4" vs "4" never pair; one-to-one
Arbitrage engine now models buy YES on one venue + buy NO on the other
(the flat "sell YES" leg isn't possible without inventory), uses Kalshi's
0.07*P*(1-P) taker fee, and drops the duplicate 2% filter in app.py.
Also: certifi CA bundle for aiohttp, st.secrets crash without secrets.t…