
Polymarket
- 1.1k installs
- 201 repo stars
- Updated August 5, 2026
- machina-sports/sports-skills
polymarket is an agent skill for querying Polymarket sports prediction market odds and events.
About
The polymarket skill exposes Polymarket sports prediction market data including live odds, prices, order books, events, series, and market search across NFL, NBA, MLB, football leagues, tennis, cricket, MMA, and esports. Core read commands work without API keys via sports-skills CLI or Python SDK, covering moneyline, spreads, totals, and player props. Critical rules require passing sport on search_markets and get_todays_events, treat prices as zero-to-one probabilities, and use token_id from get_market_details for CLOB price endpoints rather than market_id. Trading commands need py-clob-client-v2 plus POLYMARKET_PRIVATE_KEY and optional funder address for proxy wallets. The skill distinguishes prediction market sentiment from actual match results, directing score questions to sport-specific data skills instead.
- Read-only odds and events via sports-skills CLI without authentication.
- Requires sport parameter on search_markets to avoid zero-result queries.
- Prices are 0-1 probabilities; use token_id for CLOB price endpoints.
- Covers NFL, NBA, MLB, EPL, UCL, tennis, cricket, MMA, and esports.
- Trading commands need py-clob-client-v2 and wallet private key configuration.
Polymarket by the numbers
- 1,110 all-time installs (skills.sh)
- +7 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #131 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
- Security screen: HIGH risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
What polymarket says it does
Prices are probabilities on a 0-1 scale (0.65 = 65%) — no conversion needed.
npx skills add https://github.com/machina-sports/sports-skills --skill polymarketAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.1k |
|---|---|
| repo stars | ★ 201 |
| Security audit | 2 / 3 scanners passed |
| Last updated | August 5, 2026 |
| Repository | machina-sports/sports-skills ↗ |
What are current prediction market odds or favorites for this sports matchup?
Query Polymarket sports prediction market odds, events, and order books without auth.
Who is it for?
Analysts checking win probabilities and market sentiment on Polymarket sports markets.
Skip if: Skip for final scores or historical stats; use sport-specific data skills instead.
When should I use this skill?
User asks about sports betting odds, prediction markets, or who is favored to win.
What you get
Sport-scoped market search, today's events, and CLOB price data with correct identifiers.
- Market search results
- Sports event listings
- League configuration data
By the numbers
- Documents at least 6 core API commands in the reference table
- Lists sport codes including nba, epl, nfl, bun, and fl1
Files
Polymarket — Sports Prediction Markets
Before writing queries, consult references/api-reference.md for sport codes, command parameters, and price format.
Quick Start
Prefer the CLI — it avoids Python import path issues:
sports-skills polymarket search_markets --sport=nba --sports_market_types=moneyline
sports-skills polymarket get_todays_events --sport=epl
sports-skills polymarket search_markets --sport=epl --query="Leeds" --sports_market_types=moneyline
sports-skills polymarket get_sports_configPython SDK (alternative):
from sports_skills import polymarket
polymarket.search_markets(sport='nba', sports_market_types='moneyline')
polymarket.get_todays_events(sport='epl')
polymarket.search_markets(sport='epl', query='Leeds')
polymarket.get_sports_config()CRITICAL: Before Any Query
CRITICAL: Before calling any market endpoint, verify:
- The
sportparameter is always passed tosearch_marketsandget_todays_eventsfor single-game markets. - Prices are probabilities on a 0-1 scale (0.65 = 65%) — no conversion needed.
- For price/orderbook endpoints, use
token_id(CLOB), notmarket_id(Gamma). Callget_market_detailsfirst to getclobTokenIds.
Without the sport parameter:
WRONG: search_markets(query="Leeds") → 0 results
RIGHT: search_markets(sport='epl', query='Leeds') → returns all Leeds marketsPrerequisites
Core commands (no dependencies, no API keys): All read commands work out of the box.
Trading commands require py-clob-client-v2:
pip install sports-skills[polymarket]Additionally requires a configured wallet:
export POLYMARKET_PRIVATE_KEY=0x...
# Only for proxy / email (Magic) wallets, where the signer differs from the
# funds holder. EOA wallets don't need it.
export POLYMARKET_FUNDER_ADDRESS=0x...Workflows
Find Single-Game Markets for a Sport
1. search_markets --sport=nba (or epl, nfl, bun, etc.) 2. Each market includes outcomes with prices (price = probability). 3. For detailed prices, use get_market_prices --token_id=<clob_token_id>.
Today's Events for a League
1. get_todays_events --sport=epl — returns events sorted by start date. 2. Each event includes nested markets (moneyline, spreads, totals, props). 3. Pick a market, get clob_token_id from outcomes, then get_market_prices.
Live Odds Check
1. search_markets --sport=nba --query="Lakers" --sports_market_types=moneyline 2. get_market_prices --token_id=<id> for live CLOB prices. 3. Present probabilities.
Price Trend Analysis
1. Find market via search_markets --sport=nba. 2. Get clob_token_id from the outcomes. 3. get_price_history --token_id=<id> --interval=1w 4. Present price movement.
Commands
| Command | Description |
|---|---|
get_sports_config | Available sport codes |
get_todays_events | Today's events for a league |
search_markets | Find markets by sport, keyword, and type |
get_sports_markets | Browse all sports markets |
get_sports_events | Browse sports events |
get_series | List series (leagues) |
get_market_details | Single market details |
get_event_details | Single event details |
get_market_prices | Current CLOB prices |
get_order_book | Full order book |
get_price_history | Historical prices |
get_last_trade_price | Most recent trade |
See references/api-reference.md for full parameter lists and return shapes.
Examples
Example 1: Tonight's NBA favorites User says: "Who's favored in tonight's NBA games?" Actions: 1. Call search_markets(sport='nba', sports_market_types='moneyline') Result: Each matchup with implied win probabilities (price = probability)
Example 2: Team-specific odds User says: "Show me Leeds vs Man City odds" Actions: 1. Call search_markets(sport='epl', query='Leeds', sports_market_types='moneyline') Result: Leeds moneyline market with outcome prices
Example 3: Today's EPL events User says: "What EPL matches are on today?" Actions: 1. Call get_todays_events(sport='epl') Result: Today's EPL events with nested markets (moneyline, spreads, totals, props)
Example 4: League winner futures User says: "Who will win the Premier League?" Actions: 1. Call search_markets(query='Premier League') — returns futures 2. Sort results by Yes outcome price descending Result: Top contenders ranked by win probability
Example 5: Bundesliga odds User says: "Show me Bundesliga odds for Dortmund vs Bayern" Actions: 1. Call search_markets(sport='bun', query='Dortmund', sports_market_types='moneyline') Result: Dortmund/Bayern moneyline market with outcome prices
Commands that DO NOT exist — never call these
- ~~
cli_search_markets~~ — does not exist. Usesearch_marketsinstead. - ~~
cli_sports_list~~ — does not exist. Useget_sports_configinstead. - ~~
get_market_odds~~ / ~~get_odds~~ / ~~get_current_odds~~ — prices ARE probabilities. Useget_market_prices(token_id=...). - ~~
get_implied_probability~~ — the price IS the implied probability. - ~~
get_markets~~ — useget_sports_markets(browse) orsearch_markets(search). - ~~
get_team_schedule~~ — this is a football-data command, not polymarket.
If a command is not listed in references/api-reference.md, it does not exist.
Troubleshooting
Error: search_markets returns 0 results Cause: The sport parameter is missing — without it, search only checks high-volume markets and misses single-game events Solution: Always pass sport='<code>' to search_markets. Check references/api-reference.md for valid sport codes
Error: get_market_prices fails or returns wrong data Cause: market_id (Gamma) was used instead of token_id (CLOB) Solution: Call get_market_details(market_id=<id>) first to get the CLOB clobTokenIds, then use those with get_market_prices
Error: Prices seem stale or unchanged Cause: Low-liquidity market — may have wide spreads and infrequent trades Solution: Check get_last_trade_price(token_id=<id>) for the most recent actual trade price
Error: Trading commands fail Cause: py-clob-client-v2 is not installed or wallet is not configured Solution: Run pip install sports-skills[polymarket] and set POLYMARKET_PRIVATE_KEY environment variable
Polymarket — API Reference
Core Commands (no dependencies needed)
| Command | Required | Optional | Description |
|---|---|---|---|
get_sports_config | Available sport codes (nba, epl, nfl, bun, fl1, etc.) | ||
get_todays_events | sport | limit | Today's events for a league — sorted by start date |
search_markets | query, sport, sports_market_types, tag_id, limit | Find markets by sport, keyword, and type | |
get_sports_markets | limit, offset, sports_market_types, game_id, active, closed, order, ascending | Browse all sports markets | |
get_sports_events | limit, offset, active, closed, order, ascending, series_id | Browse sports events | |
get_series | limit, offset | List series (leagues) | |
get_market_details | market_id, slug | Single market details | |
get_event_details | event_id, slug | Single event details | |
get_market_prices | token_id, token_ids | Current CLOB prices | |
get_order_book | token_id | Full order book | |
get_sports_market_types | Valid market types | ||
get_price_history | token_id | interval, fidelity | Historical prices |
get_last_trade_price | token_id | Most recent trade |
Trading Commands (requires py-clob-client-v2 + wallet)
| Command | Required | Optional | Description |
|---|---|---|---|
configure | private_key, signature_type | Configure wallet | |
create_order | token_id, side, price, size | order_type | Place limit order |
market_order | token_id, side, amount | Place market order | |
cancel_order | order_id | Cancel order | |
cancel_all_orders | Cancel all orders | ||
get_orders | market | Open orders | |
get_user_trades | Your trades |
Sport Codes (Common)
| Code | League | Code | League |
|---|---|---|---|
nba | NBA | epl | English Premier League |
nfl | NFL | bun | Bundesliga |
nhl | NHL | lal | La Liga |
mlb | MLB | fl1 | Ligue 1 |
wnba | WNBA | sea | Serie A |
cfb | College Football | ucl | Champions League |
cbb | College Basketball | uel | Europa League |
atp | ATP Tennis | mls | MLS |
wta | WTA Tennis | fifwc | FIFA World Cup 2026 |
Run get_sports_config() for the full list of 120+ sport codes.
Price Format
Prices on Polymarket are probabilities on a 0-1 scale:
- Price of
0.65= 65% implied probability - No conversion needed
token_id(CLOB) is required for price/orderbook endpoints — useget_market_detailsto getclobTokenIdsfrom amarket_id
See references/api.md and references/commands.md for extended documentation.
Polymarket APIs
- Gamma API (gamma-api.polymarket.com): Market metadata, events, series. Public, no auth. Used by core commands.
- CLOB API (clob.polymarket.com): Prices, order books, trades. Public reads, no auth. Used by core commands.
- py-clob-client-v2 (Python SDK): Trading operations (create/cancel orders, view trades). Requires
pip install sports-skills[polymarket]and a wallet private key. No CLI binary needed.
Valid Commands & Common Mistakes
CRITICAL: Always use the sport parameter
For single-game markets, ALWAYS pass sport='<code>' to search_markets and get_todays_events.
WRONG: search_markets(query="Leeds") → 0 results
RIGHT: search_markets(sport='epl', query='Leeds') → returns all Leeds marketsCore Commands (no dependencies needed)
These work out of the box:
get_sports_config— list all available sport codes (nba, epl, nfl, bun, etc.)get_todays_events— today's events for a specific sport (requiressportparam)search_markets— find markets by sport, keyword, and type (usesportparam for single-game markets)get_sports_markets— browse all sports markets (sorted by volume)get_sports_events— browse sports events (sorted by volume)get_series— list series (leagues)get_market_details— single market details (by market_id or slug)get_event_details— single event details with nested marketsget_market_prices— current CLOB prices (requires token_id)get_order_book— full order book (requires token_id)get_sports_market_types— valid market typesget_price_history— historical prices (requires token_id)get_last_trade_price— most recent trade (requires token_id)
Trading Commands (requires py-clob-client-v2 + wallet)
configure— set wallet private keycreate_order— place a limit order (token_id, side, price, size)market_order— place a market order (token_id, side, amount)cancel_order— cancel an order by IDcancel_all_orders— cancel all open ordersget_orders— view open ordersget_user_trades— view your trades
Key Usage Patterns
Finding single-game markets (MOST COMMON)
# Use the sport parameter — this is the key to finding single-game markets
sports-skills polymarket search_markets --sport=nba --sports_market_types=moneyline
sports-skills polymarket search_markets --sport=epl --query="Leeds"
sports-skills polymarket get_todays_events --sport=nbaDiscovering sport codes
sports-skills polymarket get_sports_config
# Returns: nba, epl, nfl, bun, fl1, ucl, mls, atp, wta, and 110+ moreCommands that DO NOT exist (commonly hallucinated)
- ~~
cli_search_markets~~ — does not exist. Usesearch_marketsinstead. - ~~
cli_sports_list~~ / ~~cli_sports_teams~~ — do not exist. Useget_sports_configandsearch_markets(sport=...). - ~~
get_market_odds~~ / ~~get_odds~~ — market prices ARE the implied probability. Useget_market_prices(token_id="...")where price = probability. - ~~
get_implied_probability~~ — the price IS the implied probability. No conversion needed. - ~~
get_current_odds~~ — useget_last_trade_price(token_id="...")for the most recent price. - ~~
get_markets~~ — the correct command isget_sports_markets(for browsing) orsearch_markets(for searching by keyword/sport). - ~~
get_leaderboard~~ / ~~get_positions~~ / ~~get_holders~~ / ~~get_balance~~ — not available. - ~~
get_team_schedule~~ — this is a football-data command, not polymarket.
Other common mistakes
- Not using the `sport` parameter — without it,
search_marketsonly checks high-volume markets and misses single-game events. Always passsport='nba'(or epl, nfl, etc.) when looking for specific game markets. - Using
market_idwheretoken_idis needed — price and orderbook endpoints require the CLOBtoken_id, not the Gammamarket_id. Always callget_market_detailsfirst to getclobTokenIds. - Searching generic terms like "football" or "Premier League" without
sport— use the sport code parameter instead (e.g.sport='epl'). - Forgetting to get the
token_idbefore calling price/orderbook endpoints — always fetch market details first.
If you're unsure whether a command exists, check this list. Do not try commands that aren't listed above.
#!/bin/bash
# Validates polymarket parameters
COMMAND="${1:-}"
# Trading commands need py-clob-client-v2 + wallet
TRADING_COMMANDS="create_order market_order cancel_order cancel_all_orders get_orders get_user_trades"
if echo "$TRADING_COMMANDS" | grep -qw "$COMMAND"; then
echo "WARNING: $COMMAND requires py-clob-client-v2 and a wallet. Install with: pip install sports-skills[polymarket]. Set POLYMARKET_PRIVATE_KEY=0x... in .env or call configure(private_key=...)."
fi
# token_id vs market_id warning
if [[ "$COMMAND" == "get_market_prices" || "$COMMAND" == "get_order_book" || "$COMMAND" == "get_price_history" || "$COMMAND" == "get_last_trade_price" ]]; then
if [[ "$*" != *"--token_id="* ]]; then
echo "ERROR: $COMMAND requires --token_id (CLOB token ID), not market_id. Get it from get_market_details."
exit 1
fi
fi
# Search tips
if [[ "$COMMAND" == "search_markets" ]]; then
echo "TIP: search_markets matches event titles. Use the sport parameter (e.g. --sport=epl) for single-game markets. Without it, only high-volume futures are returned."
fi
echo "OK"
Related skills
How it compares
Use polymarket when agents need command-style Polymarket sports market access instead of building raw REST clients from scratch.
FAQ
Why do searches return zero results?
search_markets requires the sport parameter such as sport=epl or sport=nba.
Do read commands need API keys?
No; core read commands work out of the box without authentication.
Which ID is used for prices?
Use token_id from get_market_details for CLOB price and orderbook endpoints.
Is Polymarket safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.