diff --git a/bot/data/polymarket.py b/bot/data/polymarket.py index dc8eef9..8eb957b 100644 --- a/bot/data/polymarket.py +++ b/bot/data/polymarket.py @@ -82,9 +82,25 @@ class PolymarketClient: ] _EVENTS_KEYWORDS: list[str] = [ - "super bowl", "world cup", "oscar", "nobel", "spacex", "nasa", + "world cup", "oscar", "nobel", "spacex", "nasa", ] + # Sports markets are excluded entirely — BTC/F&G/GNews have no edge there. + # Checked before any category match so sports don't bleed into politics/events. + _SPORTS_EXCLUSIONS: list[str] = [ + " nba ", " nfl ", " mlb ", " nhl ", + "basketball", "football", "baseball", "hockey", "soccer", + " mvp ", "rookie of the", "championship", "super bowl", "world series", + "playoffs", "playoff", "tournament", + "tennis", " golf ", " ufc ", "boxing", "wrestler", "wrestling", + "slam dunk", "home run", "touchdown", + ] + + @classmethod + def _is_sports(cls, question: str) -> bool: + q = f" {question.lower()} " + return any(kw in q for kw in cls._SPORTS_EXCLUSIONS) + @classmethod def _is_crypto_finance(cls, question: str) -> bool: q = f" {question.lower()} " # pad so edge keywords match cleanly @@ -108,6 +124,8 @@ class PolymarketClient: @classmethod def _detect_category(cls, question: str) -> str: """Return the category label for a market question, or '' if unsupported.""" + if cls._is_sports(question): + return "" # exclude sports regardless of other keyword matches if cls._is_crypto_finance(question): return "crypto/finance" if cls._is_politics(question):