| name | polymarket-pro |
| description | Use the official Polymarket CLI to browse markets, trade on CLOB, manage positions, and analyze on-chain data. Features include market search, order book analysis, limit/market orders, position management, and advanced CTF operations. |
| version | 1.0.0 |
| author | Liwa |
| requirements | ["polymarket CLI (brew install or shell script)","jq (for JSON processing)","wallet (private key or created via CLI)"] |
| tags | ["polymarket","prediction-markets","trading","cli","defi","crypto"] |
Polymarket CLI Skill
This skill enables you to interact with Polymarket prediction markets using the official polymarket CLI tool. Unlike Polyclaw (which manages autonomous trading), this skill gives you direct, granular control over trading, research, and portfolio management.
Installation
Quick Install (macOS/Linux)
brew tap Polymarket/polymarket-cli https://github.com/Polymarket/polymarket-cli
brew install polymarket
Shell Script (All Platforms)
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-cli/main/install.sh | sh
Verify Installation
polymarket --version
polymarket --help
Wallet Setup
Three Ways to Provide Private Key
- CLI flag:
--private-key 0xabc...
- Environment variable:
export POLYMARKET_PRIVATE_KEY=0xabc...
- Config file:
~/.config/polymarket/config.json
Create New Wallet
polymarket wallet create
polymarket wallet create --force
polymarket wallet import 0xabc123...
polymarket wallet address
polymarket wallet show
Approvals (Required Before Trading)
polymarket approve check
polymarket approve check 0xYOUR_ADDRESS
polymarket approve set
Output Formats
Every command supports -o json or -o table (default):
polymarket markets list --limit 3
polymarket -o json markets list --limit 3
polymarket -o json markets search "bitcoin" | jq '.[].question'
Market Research
Browse Markets
polymarket markets list --limit 10
polymarket markets list --active true --order volume_num
polymarket markets list --closed false --limit 50 --offset 25
polymarket markets get 12345
polymarket markets get will-trump-win-the-2024-election
polymarket markets search "bitcoin" --limit 5
polymarket markets search "election" --limit 10
Events (Grouped Markets)
polymarket events list --limit 10
polymarket events list --tag politics --active true
polymarket events get 500
polymarket events tags 500
Tags & Series
polymarket tags list
polymarket tags get politics
polymarket tags related politics
polymarket series list --limit 10
polymarket series get 42
Order Book Analysis (No Wallet Needed)
polymarket clob price TOKEN_ID --side buy
polymarket clob midpoint TOKEN_ID
polymarket clob spread TOKEN_ID
polymarket clob batch-prices "TOKEN1,TOKEN2" --side buy
polymarket clob midpoints "TOKEN1,TOKEN2"
polymarket clob book TOKEN_ID
polymarket clob last-trade TOKEN_ID
polymarket clob price-history TOKEN_ID --interval 1d --fidelity 30
polymarket clob tick-size TOKEN_ID
polymarket clob fee-rate TOKEN_ID
polymarket clob neg-risk TOKEN_ID
Price history intervals: 1m, 1h, 6h, 1d, 1w, max
Trading (CLOB)
Place Orders
polymarket clob create-order \
--token TOKEN_ID \
--side buy --price 0.50 --size 10
polymarket clob market-order \
--token TOKEN_ID \
--side buy --amount 5
polymarket clob post-orders \
--tokens "TOKEN1,TOKEN2" \
--side buy \
--prices "0.40,0.60" \
--sizes "10,10"
Manage Orders
polymarket clob orders
polymarket clob orders --market 0xCONDITION...
polymarket clob order ORDER_ID
polymarket clob cancel ORDER_ID
polymarket clob cancel-orders "ORDER1,ORDER2"
polymarket clob cancel-market --market 0xCONDITION...
polymarket clob cancel-all
Check Balance & Trades
polymarket clob balance --asset-type collateral
polymarket clob balance --asset-type conditional --token TOKEN_ID
polymarket clob update-balance --asset-type collateral
polymarket clob trades
polymarket clob order-scoring ORDER_ID
On-Chain Data
Portfolio & Positions
polymarket data positions 0xWALLET_ADDRESS
polymarket data closed-positions 0xWALLET_ADDRESS
polymarket data value 0xWALLET_ADDRESS
polymarket data trades 0xWALLET_ADDRESS --limit 50
polymarket data activity 0xWALLET_ADDRESS
Market Data
polymarket data holders 0xCONDITION_ID
polymarket data open-interest 0xCONDITION_ID
polymarket data volume EVENT_ID
polymarket data leaderboard --period month --order-by pnl --limit 10
polymarket data builder-leaderboard --period week
polymarket data builder-volume --period month
CTF Operations
Conditional Token Framework operations for advanced users.
polymarket ctf split --condition 0xCONDITION... --amount 10
polymarket ctf merge --condition 0xCONDITION... --amount 10
polymarket ctf redeem --condition 0xCONDITION...
polymarket ctf redeem-neg-risk --condition 0xCONDITION... --amounts "10,5"
polymarket ctf condition-id --oracle 0xORACLE... --question 0xQUESTION... --outcomes 2
polymarket ctf collection-id --condition 0xCONDITION... --index-set 1
polymarket ctf position-id --collection 0xCOLLECTION...
--amount is in USDC (e.g., 10 = $10). Default --partition is binary (1,2).
Bridge (Deposit Funds)
polymarket bridge deposit 0xWALLET_ADDRESS
polymarket bridge supported-assets
polymarket bridge status 0xDEPOSIT_ADDRESS
Rewards & API
polymarket clob rewards --date 2024-06-15
polymarket clob earnings --date 2024-06-15
polymarket clob reward-percentages
polymarket clob current-rewards
polymarket clob market-reward 0xCONDITION...
polymarket clob api-keys
polymarket clob create-api-key
polymarket clob delete-api-key
polymarket clob account-status
polymarket clob notifications
Interactive Shell
polymarket shell
Supports command history - useful for exploratory analysis.
Common Workflows
Research → Trade Flow
polymarket markets search "bitcoin" --limit 5
polymarket markets get bitcoin-above-100k
polymarket clob book TOKEN_ID
polymarket clob price-history TOKEN_ID --interval 1d
polymarket clob market-order --token TOKEN_ID --side buy --amount 10
Monitor Portfolio
polymarket data positions 0xYOUR_ADDRESS
polymarket data value 0xYOUR_ADDRESS
polymarket clob orders
polymarket clob trades
polymarket data leaderboard --period month --order-by pnl
Arbitrage Detection
polymarket -o json markets list --limit 50 | jq '.[] | select(.volumeNum > 10000) | {question: .question, prices: .outcomePrices}'
polymarket clob spread TOKEN_ID
polymarket clob midpoints "TOKEN1,TOKEN2,TOKEN3"
Error Handling
| Situation | Action |
|---|
| API error | Check polymarket status for API health |
| Insufficient balance | Check polymarket clob balance --asset-type collateral |
| Approval needed | Run polymarket approve set (needs MATIC) |
| Order rejected | Check order parameters, slippage |
| Wallet not configured | Run polymarket wallet create or set private key |
Quick Reference
polymarket --help
polymarket markets --help
polymarket clob --help
polymarket status
polymarket clob ok
polymarket wallet show
polymarket setup
polymarket wallet create
polymarket approve set
polymarket markets list --limit 10
polymarket markets search "keyword"
polymarket markets get MARKET_ID
polymarket clob create-order --token ID --side buy --price 0.50 --size 10
polymarket clob market-order --token ID --side buy --amount 5
polymarket clob cancel-all
polymarket clob balance --asset-type collateral
polymarket data positions 0xADDRESS
polymarket clob trades
polymarket clob price TOKEN_ID --side buy
polymarket clob book TOKEN_ID
polymarket data leaderboard --period month
Advanced Tips
- Use JSON output for automation:
-o json enables scripting with jq
- Batch operations: Use comma-separated lists for efficiency
- Price history for analysis: Use
--interval 1d --fidelity 30 for daily candles
- Track maker rewards: Check
clob order-scoring for your orders
- CTF for larger trades: Split/merge can be more capital efficient than CLOB for large sizes
Differences from Polyclaw
| Feature | Polyclaw | Polymarket CLI |
|---|
| Trading mode | Autonomous agent | Manual/direct |
| Token creation | Yes (via Clanker) | No |
| Market discovery | AI-powered | Manual search |
| Social posting | Auto | Manual |
| Order book access | Limited | Full |
| CTF operations | No | Yes |
| Rewards tracking | Dashboard | Full API |
| Control level | High-level | Low-level |
Use Polyclaw when you want autonomous trading with a performance token.
Use Polymarket CLI when you want direct control, arbitrage, or custom strategies.