
Polymarket
- 17 installs
- 82 repo stars
- Updated August 2, 2026
- aaaaqwq/claude-code-skills
polymarket is a Claude Code skill that queries Polymarket prediction markets for odds, prices, portfolios, and trading.
About
This skill queries Polymarket prediction markets for live odds, prices, order books, events, and search results, treating prices as implied probabilities. A developer uses it to answer market-sentiment or win-probability questions and, with the Polymarket CLI and a wallet, to read portfolios, leaderboards, and place trades. Core read commands work without auth; advanced portfolio, analytics, and trading commands require the CLI binary and a private key.
- Fetches Polymarket prediction-market odds, prices, order books, and events
- Adds portfolio analytics, leaderboards, and on-chain trading via the Polymarket CLI
- Core read commands need no auth; trading needs a configured wallet
Polymarket by the numbers
- 17 all-time installs (skills.sh)
- Ranked #731 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
polymarket capabilities & compatibility
Core read commands are free with no auth; trading requires a funded wallet (USDC) and private key.
- Capabilities
- market data · portfolio analysis · trading
- Use cases
- trading · data analysis
- Pricing
- Bring your own API key
What polymarket says it does
Polymarket prediction markets — live odds, prices, order books, events, series, market search, leaderboards, portfolio analytics, trading, and on-chain operations.
**Prices are probabilities.** A price of 0.65 means 65% implied probability. No conversion needed.
npx skills add https://github.com/aaaaqwq/claude-code-skills --skill polymarketAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 17 |
|---|---|
| repo stars | ★ 82 |
| Last updated | August 2, 2026 |
| Repository | aaaaqwq/claude-code-skills ↗ |
What it does
Query Polymarket prediction markets for odds and probabilities, or trade on-chain via the CLI and a wallet.
Who is it for?
Reading prediction-market odds and probabilities, and on-chain trading
Skip if: Actual match results, scores, or historical sports statistics
When should I use this skill?
A user asks about prediction markets, betting odds, win probabilities, or market sentiment
What you get
Market probabilities, portfolio analytics, leaderboards, or placed orders from Polymarket.
- market odds and probabilities
- portfolio analytics
- placed orders
By the numbers
- 11 core commands need no auth
- 30+ CLI commands
Files
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")Prerequisites
Core commands (11 commands) work out of the box — no dependencies, no API keys.
CLI commands (30+ commands) require the Polymarket CLI binary:
pip install sports-skills[polymarket]Or via Homebrew:
brew tap Polymarket/polymarket-cli https://github.com/Polymarket/polymarket-cli
brew install polymarketTrading commands additionally require a configured wallet. Three options:
# Option 1 — environment variable
export POLYMARKET_PRIVATE_KEY=0x...# Option 2 — Python SDK (per-session)
from sports_skills import polymarket
polymarket.configure(private_key="0x...")# Option 3 — CLI config file (persists across sessions)
polymarket wallet import <private-key>
polymarket approve setIf a CLI command returns "polymarket CLI not installed", install with pip install sports-skills[polymarket].
Important Notes
- Prices are probabilities. A price of 0.65 means 65% implied probability. No conversion needed.
- `token_id` vs `market_id`: Price and orderbook endpoints require the CLOB
token_id, not the Gammamarket_id. Always callget_market_detailsfirst to getclobTokenIds. - `search_markets` matches event titles, not sport categories. Use specific league names ("Premier League", "Champions League"), not generic terms ("soccer", "football").
- `cli_search_markets` is a more powerful full-text search via the CLI binary. Use it when
search_marketsreturns no results. - 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
1. search_markets --query="<league/event name>" 2. get_market_details --market_id=<id> to get CLOB token IDs. 3. get_market_prices --token_id=<id> 4. Present probabilities.
Workflow: Event Overview
1. get_sports_events --active=true 2. Pick event, then get_event_details --event_id=<id>. 3. For each market, get prices.
Workflow: Price Trend Analysis
1. Find market via search_markets. 2. get_market_details for token_id. 3. get_price_history --token_id=<id> --interval=1w 4. Present price movement.
Workflow: Portfolio Analysis (requires CLI)
1. get_positions --address=<wallet> — open positions 2. get_portfolio_value --address=<wallet> — total value 3. get_trade_history --address=<wallet> --limit=20 — recent trades 4. get_activity --address=<wallet> — full activity feed
Workflow: Market Analytics (requires CLI)
1. get_holders --condition_id=<id> — who holds positions 2. get_open_interest --condition_id=<id> — total interest 3. get_volume --event_id=<id> — volume data
Workflow: Leaderboard (requires CLI)
1. get_leaderboard --period=week --order_by=pnl --limit=20 2. get_profile --address=<top_trader_address> — inspect top traders
Workflow: Trading (requires CLI + wallet)
1. get_balance --asset_type=collateral — check USDC balance 2. cli_search_markets --query="NBA" — find markets 3. get_market_details --market_id=<id> — get token_id 4. create_order --token_id=<id> --side=buy --price=0.55 --size=10 5. get_orders — verify order placed 6. cancel_order --order_id=<id> — cancel if needed
Commands Reference
Core Commands (no CLI needed)
| Command | Required | Optional | Description |
|---|---|---|---|
get_sports_markets | limit, offset, sports_market_types, game_id, active, closed, order, ascending | Browse 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 | ||
search_markets | query, sports_market_types, tag_id, limit | Search by keyword | |
get_price_history | token_id | interval, fidelity | Historical prices |
get_last_trade_price | token_id | Most recent trade |
CLI Commands: Data & Analytics
| Command | Required | Optional | Description |
|---|---|---|---|
get_leaderboard | period, order_by, limit | Trader leaderboard | |
get_positions | address | Open positions | |
get_closed_positions | address | Closed positions | |
get_portfolio_value | address | Portfolio value | |
get_trade_history | address | limit | Trade history |
get_activity | address | Activity feed | |
get_holders | condition_id | Market position holders | |
get_open_interest | condition_id | Open interest | |
get_volume | event_id | Volume data | |
get_traded | address | Markets traded |
CLI Commands: Search, Tags & Discovery
| Command | Required | Optional | Description |
|---|---|---|---|
cli_search_markets | query | limit | Full-text search (CLI) |
get_tags | limit | List all tags | |
get_tag | tag | Tag details | |
get_related_tags | tag | Related tags |
CLI Commands: Comments & Profiles
| Command | Required | Optional | Description |
|---|---|---|---|
get_comments | entity_type, entity_id | Comments on entity | |
get_comment | comment_id | Single comment | |
get_user_comments | address | Comments by user | |
get_profile | address | Public profile |
CLI Commands: Sports Metadata
| Command | Required | Optional | Description |
|---|---|---|---|
cli_sports_list | List sports | ||
cli_sports_teams | league | limit | Teams by league |
CLI Commands: CLOB Extras
| Command | Required | Optional | Description |
|---|---|---|---|
get_tick_size | token_id | Minimum tick size | |
get_fee_rate | token_id | Fee rate |
CLI Commands: Trading (requires wallet)
| Command | Required | Optional | Description |
|---|---|---|---|
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_balance | asset_type, token_id | Wallet balance | |
get_orders | market | Open orders | |
get_user_trades | Your trades |
CLI Commands: On-Chain (requires wallet)
| Command | Required | Optional | Description |
|---|---|---|---|
ctf_split | condition_id, amount | Split USDC to YES/NO | |
ctf_merge | condition_id, amount | Merge YES/NO to USDC | |
ctf_redeem | condition_id | Redeem winning tokens | |
approve_check | address | Check approvals | |
approve_set | Approve contracts |
Examples
User: "Who's favored to win the NBA Finals?" 1. Call search_markets(query="NBA Finals", sports_market_types="moneyline") 2. Get token_id from the market details 3. Call get_market_prices(token_id="...") for current odds 4. Present teams with implied probabilities (price = probability)
User: "Who will win the Premier League?" 1. Call search_markets(query="English Premier League") -- use full league name 2. Sort results by Yes outcome price descending 3. Present teams with implied probabilities (price = probability)
User: "Show me Champions League odds" 1. Call search_markets(query="Champions League") 2. Present top contenders with prices, volume, and liquidity
User: "Show me the Polymarket leaderboard" 1. Call get_leaderboard(period="week", order_by="pnl", limit=20) 2. Present traders with rank, username, PnL, and volume
User: "What positions does this wallet hold?" 1. Call get_positions(address="0x...") 2. Present positions with outcome, size, avg price, current value, PnL
User: "Buy 10 shares of YES on this market" 1. Call get_market_details(market_id="...") to get token_id 2. Call create_order(token_id="...", side="buy", price="0.55", size="10") 3. Call get_orders() to confirm
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. - If a CLI command returns "polymarket CLI not installed", the command requires the Rust binary. The original 11 commands work without the CLI.
- If a trading command fails with an auth error, ensure a wallet is configured:
polymarket wallet create && polymarket approve set. - Never fabricate odds or probabilities. If no market exists, state so.
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.
- Polymarket CLI (
polymarketbinary): Full platform access via subprocess. Requires separate installation (brew install polymarket). Supports all Gamma, CLOB, Data, CTF, and trading operations via-o jsonoutput. Used for: leaderboard, positions, portfolio, trading, on-chain ops, comments, profiles, full-text search, tags, sports metadata.
Valid Commands & Common Mistakes
Core Commands (no CLI needed)
These work out of the box with no external dependencies:
get_sports_marketsget_sports_eventsget_seriesget_market_detailsget_event_detailsget_market_pricesget_order_bookget_sports_market_typessearch_marketsget_price_historyget_last_trade_price
CLI Commands: Data & Analytics (requires polymarket binary)
get_leaderboard— trader leaderboard (period, order_by, limit)get_positions— open positions by wallet addressget_closed_positions— closed positions by wallet addressget_portfolio_value— portfolio value by wallet addressget_trade_history— trade history by wallet addressget_activity— activity feed by wallet addressget_holders— market position holders by condition_idget_open_interest— open interest by condition_idget_volume— volume by event_idget_traded— markets traded by wallet address
CLI Commands: Search & Tags (requires polymarket binary)
cli_search_markets— full-text search (more powerful than search_markets)get_tags— list all tagsget_tag— tag detailsget_related_tags— related tags
CLI Commands: Comments & Profiles (requires polymarket binary)
get_comments— comments on an entity (entity_type + entity_id)get_comment— single comment by IDget_user_comments— comments by user addressget_profile— public user profile by address
CLI Commands: Sports Metadata (requires polymarket binary)
cli_sports_list— list all sportscli_sports_teams— teams by league
CLI Commands: CLOB Extras (requires polymarket binary)
get_tick_size— minimum tick size by token_idget_fee_rate— fee rate by token_id
CLI Commands: Trading (requires polymarket binary + wallet)
create_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_balance— check wallet balanceget_orders— view open ordersget_user_trades— view your trades
CLI Commands: On-Chain (requires polymarket binary + wallet)
ctf_split— split USDC into YES/NO tokens (condition_id, amount)ctf_merge— merge YES/NO tokens back to USDC (condition_id, amount)ctf_redeem— redeem winning tokens (condition_id)approve_check— check contract approvalsapprove_set— approve all contracts for trading
Commands that DO NOT exist (commonly hallucinated)
- ~~
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).
Other common mistakes
- 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 "soccer" or "football" --
search_marketsmatches event titles. Use specific league names: "Premier League", "Champions League", "La Liga", etc. - 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:-}"
# CLI-required commands
CLI_COMMANDS="get_leaderboard get_positions get_closed_positions get_portfolio_value get_trade_history get_activity get_holders get_open_interest get_volume get_traded cli_search_markets get_tags get_tag get_related_tags get_comments get_comment get_user_comments get_profile cli_sports_list cli_sports_teams get_tick_size get_fee_rate create_order market_order cancel_order cancel_all_orders get_balance get_orders get_user_trades ctf_split ctf_merge ctf_redeem approve_check approve_set"
if echo "$CLI_COMMANDS" | grep -qw "$COMMAND"; then
if ! command -v polymarket &>/dev/null; then
echo "ERROR: $COMMAND requires the polymarket CLI. Install with: brew tap Polymarket/polymarket-cli https://github.com/Polymarket/polymarket-cli && brew install polymarket"
exit 1
fi
fi
# Trading commands need wallet
TRADING_COMMANDS="create_order market_order cancel_order cancel_all_orders approve_set ctf_split ctf_merge ctf_redeem"
if echo "$TRADING_COMMANDS" | grep -qw "$COMMAND"; then
echo "WARNING: $COMMAND requires an authenticated wallet. Ensure POLYMARKET_PRIVATE_KEY is set or wallet is configured."
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 league names (e.g., 'Premier League', 'NBA Finals'), not generic terms like 'soccer'."
fi
echo "OK"
Related skills
FAQ
Do I need an API key or CLI?
Core commands (11) work with no auth; 30+ advanced commands require the Polymarket CLI binary, and trading also needs a configured wallet.
How do I read prices?
Prices are probabilities: a price of 0.65 means 65% implied probability, no conversion needed.