Polymarket prediction markets at your fingertips - check odds, track portfolios, research markets with AI-powered analysis, compare markets, and trade. Covers all 4 Polymarket APIs: Gamma, CLOB, Data API, RTDS WebSocket, and Bridge. Read-only works instantly (no setup). The most comprehensive prediction markets skill on ClawHub.
Polymarket prediction markets at your fingertips - check odds, track portfolios, research markets with AI-powered analysis, compare markets, and trade. Covers all 4 Polymarket APIs: Gamma, CLOB, Data API, RTDS WebSocket, and Bridge. Read-only works instantly (no setup). The most comprehensive prediction markets skill on ClawHub.
{"openclaw":{"emoji":"📊","tags":["prediction-markets","polymarket","trading","odds","betting","forecasting","probabilities","portfolio","research","crypto","politics","sports","finance","websocket","bridge","data-api"],"triggers":["polymarket","prediction market","prediction markets","what are the odds","market odds","betting odds","check odds","trending markets","market research","compare markets","portfolio positions","open positions","trade on polymarket","buy shares","sell shares","polymarket leaderboard","polymarket deposit","polymarket withdraw","crypto prices live"]}}
Polymarket
Query Polymarket prediction markets and trade from the terminal. Browse odds, research events, compare markets, track your portfolio, stream live data, bridge funds, and execute trades - all through natural language.
Polymarket exposes 4 separate APIs plus the Gamma convenience layer. This skill covers all of them.
Setup
Read-only commands work immediately (no install needed). Browsing, searching, trending, categories, market research, and comparison mode all use the public Gamma API.
For trading, order books, price history, and advanced features, install the Polymarket CLI (Rust binary, v0.1.5+):
brew install polymarket/tap/polymarket-cli
For trading, set up a wallet:
polymarket wallet create
polymarket approve set
Or manually configure ~/.config/polymarket/config.json with your private key. See the CLI docs for details.
The CLI also provides an interactive REPL:
polymarket shell
Use --output json on any CLI command for machine-readable output suitable for scripting and piping.
Commands
Browse Markets (no CLI needed)
# Trending/active markets (sorted by 24h volume)
python3 {baseDir}/scripts/polymarket.py trending
# Trending with more results
python3 {baseDir}/scripts/polymarket.py trending --limit 20
# Search markets by keyword
python3 {baseDir}/scripts/polymarket.py search "trump"# Get specific event by slug
python3 {baseDir}/scripts/polymarket.py event "fed-decision-in-october"# Get markets by category
python3 {baseDir}/scripts/polymarket.py category politics
python3 {baseDir}/scripts/polymarket.py category crypto
python3 {baseDir}/scripts/polymarket.py category sports
python3 {baseDir}/scripts/polymarket.py category tech
python3 {baseDir}/scripts/polymarket.py category entertainment
python3 {baseDir}/scripts/polymarket.py category science
python3 {baseDir}/scripts/polymarket.py category business
Trending Markets Dashboard (no CLI needed)
Show a categorized dashboard of the hottest markets across Polymarket. Combine trending with category filters to build a full overview.
# Full trending dashboard - run these in sequence to build a picture:
python3 {baseDir}/scripts/polymarket.py trending --limit 10
python3 {baseDir}/scripts/polymarket.py category politics --limit 5
python3 {baseDir}/scripts/polymarket.py category crypto --limit 5
python3 {baseDir}/scripts/polymarket.py category sports --limit 5
python3 {baseDir}/scripts/polymarket.py category tech --limit 5
When the user asks for a "dashboard" or "overview," run all category queries and present the results grouped by section with clear headings. Include volume and current odds for each market.
Market Research Mode (no CLI needed)
Market research combines Polymarket odds with contextual analysis. When the user asks to "research" a market or wants deeper analysis beyond just odds:
Fetch the market data using search or event commands
Analyze the odds - what does the market imply? Is there an edge?
Provide context - use your knowledge to explain what drives the odds
Show historical movement - if CLI is available, pull price history
Compare to consensus - how do Polymarket odds compare to polls, expert opinion, or other prediction markets?
# Step 1: Find the market
python3 {baseDir}/scripts/polymarket.py search "fed rate cut"# Step 2: Get detailed event data
python3 {baseDir}/scripts/polymarket.py event "fed-rate-decision-march-2026"# Step 3: If CLI available, get price history to show trend
python3 {baseDir}/scripts/polymarket.py price-history TOKEN_ID --interval 1d
# Step 4: Check order book depth for liquidity assessment
python3 {baseDir}/scripts/polymarket.py book TOKEN_ID
After gathering data, synthesize the research into a structured report:
Current Odds: Yes/No percentages and what they imply
Volume & Liquidity: How much money is in this market, is it liquid enough to trade?
Trend: Are odds moving up or down? Any recent spikes?
Context: What real-world events or data points are driving the odds?
Key Dates: When does the market resolve? Any upcoming catalysts?
Risk Factors: What could cause a sudden move?
Market Comparison Mode (no CLI needed)
Compare related markets side-by-side. Useful for finding arbitrage, understanding conditional probabilities, or just seeing how different outcomes relate.
# Compare two or more related markets by searching for each
python3 {baseDir}/scripts/polymarket.py search "trump 2028"
python3 {baseDir}/scripts/polymarket.py search "desantis 2028"
python3 {baseDir}/scripts/polymarket.py search "newsom 2028"
When the user asks to "compare markets" or "side-by-side odds":
Search for each market the user mentions
Present odds in a comparison table format
Note volume differences (higher volume = more reliable odds)
Flag any apparent inconsistencies (e.g., probabilities that should sum to ~100% but don't)
View your complete portfolio with positions, P&L, and open orders in one view.
# View all open positions
python3 {baseDir}/scripts/polymarket.py positions
# View positions for a specific wallet
python3 {baseDir}/scripts/polymarket.py positions --address 0xYOUR_WALLET
# Check USDC balance
python3 {baseDir}/scripts/polymarket.py wallet-balance
# Check balance for a specific token
python3 {baseDir}/scripts/polymarket.py wallet-balance --token TOKEN_ID
# List all open orders
python3 {baseDir}/scripts/polymarket.py orders
When the user asks for a "portfolio dashboard" or "how am I doing," run all three commands (positions, wallet-balance, orders) and present a unified view:
Positions: Each position with current market price, your entry price (if available), and unrealized P&L
USDC Balance: Available cash for new trades
Open Orders: Pending limit orders with price and size
Total Portfolio Value: Sum of positions + USDC balance
Order Book & Prices (CLI required, no wallet)
# Order book for a token
python3 {baseDir}/scripts/polymarket.py book TOKEN_ID
# Price history (intervals: 1m, 1h, 6h, 1d, 1w, max)
python3 {baseDir}/scripts/polymarket.py price-history TOKEN_ID --interval 1d
# Price history with specific number of data points
python3 {baseDir}/scripts/polymarket.py price-history TOKEN_ID --interval 1h --fidelity 48
All trades require --confirm to execute. Without it, the order is previewed only. This is a safety feature - you always see what will happen before it happens.
Cost & Fee Transparency
Before executing any trade, the skill displays:
Order type: Limit or Market
Side: Buy or Sell
Price: Your limit price (or "market" for market orders)
Size: Number of shares
Estimated cost: Price x Size for limit orders, or dollar amount for market orders
Polymarket fee: Polymarket charges no trading fees on the CLOB (Central Limit Order Book)
Gas fees: On-chain operations (approvals, splits, redeems) require MATIC for gas on Polygon. Typical gas: $0.01-0.05
# Preview a limit order (no --confirm = preview only)
python3 {baseDir}/scripts/polymarket.py trade buy --token TOKEN_ID --price 0.50 --size 10
# Execute a limit order
python3 {baseDir}/scripts/polymarket.py --confirm trade buy --token TOKEN_ID --price 0.50 --size 10
# Sell limit order
python3 {baseDir}/scripts/polymarket.py --confirm trade sell --token TOKEN_ID --price 0.70 --size 10
# Market order: buy $5 worth at current price
python3 {baseDir}/scripts/polymarket.py --confirm trade buy --token TOKEN_ID --market-order --amount 5
# Post-only limit order (rests on book only, never takes liquidity - Jan 2026+)
python3 {baseDir}/scripts/polymarket.py --confirm trade buy --token TOKEN_ID --price 0.45 --size 20 --post-only
Orders & Positions (CLI + wallet required)
# List open orders
python3 {baseDir}/scripts/polymarket.py orders
# Cancel a specific order
python3 {baseDir}/scripts/polymarket.py --confirm orders --cancel ORDER_ID
# Cancel all orders
python3 {baseDir}/scripts/polymarket.py --confirm orders --cancel all
# View positions
python3 {baseDir}/scripts/polymarket.py positions
python3 {baseDir}/scripts/polymarket.py positions --address 0xYOUR_WALLET
API Reference
Polymarket exposes 4 distinct APIs plus the Gamma convenience layer. Each serves a different purpose.
1. Gamma API (gamma-api.polymarket.com) - Public, no auth
The high-level convenience API for browsing and searching markets. Used by all read-only commands.
Base URL: https://gamma-api.polymarket.com
GET /events - List events (params: order, ascending, closed, limit, tag_slug)
GET /search - Search markets (params: query, limit)
GET /events/slug/{slug} - Event by slug
GET /comments - List and filter comments on markets
GET /profiles/{address} - Public user profiles
GET /series - Grouped event collections (e.g., "2028 Election" series)
GET /sports - Sports metadata including teams, matches, and resolution criteria
GraphQL: POST /query - Full GraphQL endpoint with subscription support
2. CLOB API (clob.polymarket.com) - Trading
The Central Limit Order Book API for all trading operations. Wrapped by the Polymarket CLI.
GET /closed-positions?user={address} - Historical closed positions
GET /activity?user={address} - Activity feed
Types: TRADE, SPLIT, MERGE, REDEEM, REWARD
GET /value?user={address} - Portfolio valuation in USD
GET /trades - Trade history
Filter by: user, market, side
Max 500 results per page
GET /holders?market={conditionId} - Top token holders for a market
GET /oi - Open interest across markets
GET /volume - Trading volume across markets
GET /leaderboard - Trader rankings (configurable time period)
Use the Data API for portfolio dashboards and analytics. It provides richer position data than the CLOB API, including P&L calculations and activity history.
Run trending and present top markets grouped by volume:
Trending on Polymarket
Fed Rate Decision - March 2026
Markets: 3
- Rate cut: 72.3%
- No change: 25.1%
- Rate hike: 2.6%
Total Volume: $8.1M
Bitcoin above $150K by July 2026
Yes: 28.4% | No: 71.6%
Volume: $3.9M
UFC 310 Main Event Winner
Fighter A: 62.1% | Fighter B: 37.9%
Volume: $1.2M
Example 3: Market research
User: "Research the Fed rate decision market for me"
The skill fetches market data, then provides analysis:
Market Research: Fed Rate Decision - March 2026
Current Odds:
Rate cut: 72.3% (down from 81% last week)
No change: 25.1% (up from 17% last week)
Rate hike: 2.6% (stable)
Volume & Liquidity:
Total Volume: $8.1M
24h Volume: $420K
Order book depth: Deep (>$50K on both sides)
Trend: Odds of a cut have fallen ~9 points in the past week,
likely driven by stronger-than-expected jobs report on Friday.
Key Dates:
- FOMC Meeting: March 18-19, 2026
- Market resolves: March 19, 2026
Context: The market is pricing in a ~72% chance of a 25bp cut.
This aligns roughly with CME FedWatch tool (68%) and economist
consensus (65-75% for a cut). The slight premium on Polymarket
may reflect retail sentiment skewing more dovish.
Example 4: Portfolio via Data API
User: "How's my Polymarket portfolio doing?"
Use the Data API for rich portfolio data:
# Portfolio value
curl -s "https://data-api.polymarket.com/value?user=0xYOUR_WALLET"# Open positions sorted by P&L
curl -s "https://data-api.polymarket.com/positions?user=0xYOUR_WALLET&sortBy=CASHPNL"# Recent activity
curl -s "https://data-api.polymarket.com/activity?user=0xYOUR_WALLET"
Output:
Portfolio Dashboard
Portfolio Value: $289.80
Positions (sorted by P&L):
Fed Rate Cut (Yes) 100 shares @ $0.65 Current: $0.72 P&L: +$7.00
BTC > $150K July (No) 50 shares @ $0.60 Current: $0.71 P&L: +$5.50
Recent Activity:
TRADE Bought 25 Fed Rate Cut (Yes) @ $0.68 2 hours ago
REDEEM Claimed $12.40 from resolved market 1 day ago
USDC Balance: $142.30
Open Orders: 1 pending
Buy Limit Order (PREVIEW)
Token: Fed Rate Decision - Rate Cut (Yes)
Side: BUY
Price: $0.68
Size: 50 shares
Estimated Cost: $34.00
Trading Fee: $0.00 (Polymarket CLOB has no trading fees)
Gas Fee: ~$0.01-0.05 MATIC (only on first approval)
Add --confirm to execute this trade.
This involves REAL MONEY on Polygon.
Example 7: Leaderboard and top holders
User: "Who are the top Polymarket traders?"
# Trader leaderboard
curl -s "https://data-api.polymarket.com/leaderboard"# Top holders for a specific market
curl -s "https://data-api.polymarket.com/holders?market=CONDITION_ID"
Example 8: Bridge funds in
User: "I want to deposit funds to Polymarket from Ethereum"
# Check supported assets
curl -s "https://bridge.polymarket.com/supported-assets"# Get a quote
curl -s -X POST "https://bridge.polymarket.com/deposit" \
-H "Content-Type: application/json" \
-d '{"chain": "ethereum", "asset": "USDC"}'
Example 9: Historical price analysis
User: "Show me the price history for this market over the past week"
# Via CLOB API
curl -s "https://clob.polymarket.com/prices-history?tokenID=TOKEN_ID&interval=1d&fidelity=7"# Or via CLI
polymarket price-history TOKEN_ID --interval 1d --output json
Real money. Trades execute on Polygon with real USDC. Double-check everything.
All trades require --confirm. Without it, you get a preview only. This is non-negotiable.
The CLI is experimental. The Polymarket team warns: "Use at your own risk and do not use with large amounts of funds."
Private key security. Your key is stored in ~/.config/polymarket/config.json. Never share it, never commit it.
Gas fees. On-chain operations (approvals, splits, redeems) require MATIC for gas on Polygon.
Heartbeat API. If you use the heartbeat system for market making, a missed heartbeat (>10s) cancels all your resting orders.
Market resolution. Markets resolve based on the resolution source specified in each market. Check the resolution criteria before trading.
Slippage. Market orders execute at the best available price, which may differ from the displayed price in fast-moving markets.
Liquidity. Low-volume markets may have wide bid-ask spreads. Check the order book before placing large orders.
Bridge funds. Cross-chain bridging involves smart contract risk. Verify addresses and amounts before confirming.
Related Skills
Looking for more market intelligence? Try these OpenClaw skills:
/search-x - Search X/Twitter for real-time sentiment on any topic. Pair with Polymarket odds to gauge whether the market is ahead of or behind public opinion.
/last30days - Deep research on any topic using web + social sources. Use it to build context before placing a trade.
/parallel - Run multiple research tasks simultaneously. Combine Polymarket odds with news, social sentiment, and expert analysis in one shot.