Polymarket — Sports Prediction Markets
Quick Start
Prefer the CLI — it avoids Python import path issues:
sports-skills polymarket get_sports_markets --limit=20
sports-skills polymarket search_markets --query="NBA Finals"
Python SDK (alternative):
from sports_skills import polymarket
markets = polymarket.get_sports_markets(limit=20)
prices = polymarket.get_market_prices(token_id="abc123")
Important Notes
- Prices are probabilities. A price of 0.65 means 65% implied probability. No conversion needed.
token_idvsmarket_id: Price and orderbook endpoints require the CLOBtoken_id, not the Gammamarket_id. Always callget_market_detailsfirst to getclobTokenIds.search_marketsmatches event titles, not sport categories. Use specific league names ("Premier League", "Champions League"), not generic terms ("soccer", "football").- Before complex fetches, run the parameter validator:
bash scripts/validate_params.sh <command> [args]
For detailed reference data, see the files in the references/ directory.
Workflows
Workflow: Live Odds Check
search_markets --query="<league/event name>"get_market_details --market_id=<id>to get CLOB token IDs.get_market_prices --token_id=<id>- Present probabilities.
Workflow: Event Overview
get_sports_events --active=true- Pick event, then
get_event_details --event_id=<id>. - For each market, get prices.
Workflow: Price Trend Analysis
- Find market via
search_markets. get_market_detailsfor token_id.get_price_history --token_id=<id> --interval=1w- Present price movement.
Examples
User: "Who's favored to win the NBA Finals?"
- Call
search_markets(query="NBA Finals", sports_market_types="moneyline") - Get
token_idfrom the market details - Call
get_market_prices(token_id="...")for current odds - Present teams with implied probabilities (price = probability)
User: "Who will win the Premier League?"
- Call
search_markets(query="English Premier League")-- use full league name - Sort results by Yes outcome price descending
- Present teams with implied probabilities (price = probability)
User: "Show me Champions League odds"
- Call
search_markets(query="Champions League") - Present top contenders with prices, volume, and liquidity
Error Handling & Fallbacks
- If search returns 0 results, try full league names ("English Premier League" not "EPL", "Champions League" not "CL"). search_markets matches event titles.
- If
get_market_pricesfails, you likely usedmarket_idinstead oftoken_id. Always callget_market_detailsfirst to get CLOBtoken_id. - If prices seem stale, check
get_last_trade_pricefor the most recent trade. Low-liquidity markets may have wide spreads. - Never fabricate odds or probabilities. If no market exists, state so.