Skip to content

feat(sports): Wimbledon tennis coverage (ATP + WTA match-winner)#213

Open
michaelschecht wants to merge 1 commit into
mike_win-desktopfrom
feature/wimbledon-tennis
Open

feat(sports): Wimbledon tennis coverage (ATP + WTA match-winner)#213
michaelschecht wants to merge 1 commit into
mike_win-desktopfrom
feature/wimbledon-tennis

Conversation

@michaelschecht

Copy link
Copy Markdown
Owner

Summary

Wimbledon 2026 starts June 29. This PR wires Wimbledon ATP and WTA singles into the edge-detection pipeline so the daily scan picks up match-winner markets automatically.

  • KXATPMATCHtennis_atp_wimbledon (Odds API), KXWTAMATCHtennis_wta_wimbledon — added to CATEGORY_MAP (both as "game") and KALSHI_TO_ODDS_SPORT
  • New wimbledon and tennis filter shortcuts — python scripts/scan.py sports --filter wimbledon --top 30
  • Tennis is h2h match-winner only (no spread or total on Kalshi), so no stdev entries or spread/total edge-math changes are needed; the existing detect_edge_game path handles it
  • Extended extract_event_teams() with a tennis-specific regex for the "If [Player A] wins this match against [Player B]" rules_primary pattern
  • Display wiring: KXATP/KXWTA prefix → "Tennis" sport label in ticker_display.py; player abbreviations from ticker suffixes pass through raw (not in the US-sport alias table)

⚠️ Must verify locally before merging

The Kalshi API was egress-blocked in the cloud environment during implementation, so the ticker prefixes could not be directly confirmed. KXATPMATCH / KXWTAMATCH are the best-guess prefixes based on Kalshi's naming conventions.

Required local validation step:

python scripts/scan.py sports --filter wimbledon --top 30

If the real prefix differs (e.g. KXATPGAME, KXWTAGAME, KXWIMMEN, KXWMENSINGLES), update these four locations:

  1. CATEGORY_MAP in scripts/kalshi/edge_detector.py
  2. KALSHI_TO_ODDS_SPORT in scripts/kalshi/edge_detector.py
  3. FILTER_SHORTCUTS in scripts/kalshi/edge_detector.py
  4. _SPORT_PREFIXES in scripts/shared/ticker_display.py

If the rules_primary text uses a different pattern than "wins this match against", extend extract_event_teams() in edge_detector.py accordingly. The comment in the new test class (TestTennisMappings) documents alternate prefixes to try.

Test plan

  • python -m pytest -q503 passing (was 493; +10 new tests)
  • python scripts/scan.py sports --filter wimbledon --top 30 — confirms live Kalshi ticker prefix and that odds events match
  • Inspect one returned opportunity with python scripts/kalshi/edge_detector.py detail <ticker> — confirm player names extracted correctly from rules_primary
  • If needed: adjust prefix constants and re-run suite

Files changed

scripts/kalshi/edge_detector.py, scripts/shared/ticker_display.py, tests/test_edge_detection.py, tests/test_ticker_display.py, CLAUDE.md, docs/kalshi/kalshi-sports-betting/SPORTS_GUIDE.md, docs/CHANGELOG.md


Generated by Claude Code

Wires KXATPMATCH (ATP) and KXWTAMATCH (WTA) through the edge-detection
pipeline as h2h game markets. No spread or total — tennis is match-winner
only on Kalshi. New `wimbledon` and `tennis` filter shortcuts route to
tennis_atp_wimbledon / tennis_wta_wimbledon Odds API keys.

Extends extract_event_teams() with a tennis-specific "wins this match
against" regex and adds sport-display wiring (KXATP/KXWTA → "Tennis")
in ticker_display.py.

CAVEAT: Kalshi API was egress-blocked in the cloud environment so ticker
prefixes (KXATPMATCH/KXWTAMATCH) were not directly verified. Must confirm
locally: python scripts/scan.py sports --filter wimbledon --top 30

+10 tests → 503 passing.
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.

2 participants