Skip to content

fix(kalshi-res): exclude Exotics, add event category cache - #1690

Merged
Flotapponnier merged 1 commit into
devfrom
fix/kalshi-res-category-exotics
Jul 29, 2026
Merged

fix(kalshi-res): exclude Exotics, add event category cache#1690
Flotapponnier merged 1 commit into
devfrom
fix/kalshi-res-category-exotics

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Problem

The previous Kalshi poller had two critical issues making the comparison unfair:

  1. All categories mapped to "other" — Kalshi /markets API returns no category field. Every market was hitting the default: "other" branch.

  2. Exotics (auto-generated parlays) dominated data — The 1000 most recently settled Kalshi markets were 100% KXMV* multivariate parlays that Kalshi auto-settles algorithmically in 0–200 seconds. These are not prediction market questions and have no equivalent on Polymarket. Their inclusion was pulling Kalshi's p50 to ~3 minutes, which would have read as "Kalshi resolves 20x faster than Polymarket" — technically true but comparing algorithmic settlement to UMA's 2h challenge window.

Fix

  • pollFinalized now fetches event category lazily via /events/{event_ticker} (in-memory cache, one HTTP call per unique event, ~50–150 events per poll cycle)
  • Markets with Kalshi category Exotics are excluded (and marked recorded to skip on next poll)
  • Category mapping: Sports→sports, Politics/Elections→politics, Crypto/Financials→crypto, rest→other
  • Bench YAML methodology note added explaining anchor asymmetry (Polymarket 2h protocol floor vs Kalshi no floor)

VPS

Deploy separately after merge (rebuild needed).

…ache

- pollFinalized now fetches category from /events/{event_ticker} (cached)
- Exotics (KXMV* multivariate parlays) excluded: settle algorithmically
  in 0-200s, not comparable to prediction market questions
- Category mapping: Sports->sports, Politics/Elections->politics,
  Crypto/Financials->crypto, rest->other
- settlement_ts used for exact delay (not poll-time proxy)
- Bench YAML methodology + disclaimer updated with anchor asymmetry note
@Flotapponnier
Flotapponnier merged commit c464132 into dev Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant