Polymarket CLI Trading — Polymarket 命令行工具 Trading
v1.0.0Trade prediction markets on Polymarket using the official polymarket 命令行工具. Use when the user wants to browse prediction markets, place bets, manage orders, 检查 positions, view order books, or trade on market outcomes. Also use when they mention "prediction market," "bet," "polymarket," "YES/NO," "order book," "CLOB," "limit order," "market order," "hedge," "arbitrage," "liquidity rewards," or "conditional 令牌s."
运行时依赖
安装命令
点击复制技能文档
Polymarket Trading 技能
Trade prediction markets on Polymarket through the official polymarket 命令行工具. Browse markets, place limit and market orders, manage positions, 检查 rewards, and interact with conditional 令牌s — all from the terminal.
安装ation macOS / Linux (Homebrew) brew tap Polymarket/polymarket-命令行工具 https://github.com/Polymarket/polymarket-命令行工具 brew 安装 polymarket
Shell script curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-命令行工具/mAIn/安装.sh | sh
Build from source (Rust) git clone https://github.com/Polymarket/polymarket-命令行工具 cd polymarket-命令行工具 cargo 安装 --path .
Wallet 设置up # 图形界面ded first-time 设置up polymarket 设置up
# Or manually: polymarket wallet 创建 polymarket 应用rove 设置 # needs MATIC for gas on Polygon
Configuration
Private key is resolved in order:
命令行工具 flag: --private-key 0xabc... 环境 variable: POLYMARKET_PRIVATE_KEY=0xabc... Config file: ~/.config/polymarket/config.json
签名ature types: proxy (default), eoa, gnosis-safe. Override with --签名ature-type.
Overview
You are an expert in using the polymarket 命令行工具 for prediction market trading. Your goal is to help users trade on Polymarket efficiently while emphasizing safety, position management, and risk awareness.
How to Use This 技能 Safety First: 启动 with small positions. Polymarket trades are real money on Polygon mAInnet. 验证 Before Trading: Always show the exact command and confirm with the user before executing trades. 检查 Prerequisites: Confirm wallet is 设置 up, 应用rovals are granted, and sufficient USDC balance exists. Use JSON 输出: For scripting and 自动化, use -o json for machine-readable 输出. Understand 令牌 IDs: Each market outcome (YES/NO) has a unique 令牌 ID. 获取 it from market detAIls or order book commands. When to Use This 技能
Use this 技能 when the user wants to:
Browse or 搜索 prediction markets Place bets (limit orders, market orders) 检查 market prices, spreads, and order books View or manage open orders 检查 portfolio positions and P/L Cancel orders Redeem winnings from resolved markets 检查 liquidity rewards and earnings 监控 market activity and leaderboards Hedge positions across markets
Common trigger phrases:
"What prediction markets are trending?" "Buy YES on Bitcoin above 100k" "Show me the order book" "What's the spread on this market?" "Cancel all my orders" "检查 my positions" "How much have I earned in rewards?" "Place a limit order at 0.45" "Hedge my position"
When NOT to use this 技能:
User wants to trade stocks/ETFs/options (use Alpaca trading 技能) User wants financial advice (provide 工具s, not recommendations) User wants to use the Polymarket 网页 UI Core Commands Market Discovery (No wallet needed)
列出 markets:
polymarket markets 列出 --limit 10 polymarket markets 列出 --active true --order volume_num polymarket markets 列出 --closed false --limit 50 --off设置 25
获取 market detAIls:
polymarket markets 获取 12345 polymarket markets 获取 will-trump-win # by slug
搜索 markets:
polymarket markets 搜索 "bitcoin" --limit 5
列出 事件 (groups of related markets):
polymarket 事件 列出 --limit 10 polymarket 事件 列出 --tag politics --active true polymarket 事件 获取 500
Browse tags and categories:
polymarket tags 列出 polymarket tags 获取 politics polymarket tags related politics
Sports markets:
polymarket sports 列出 polymarket sports market-types polymarket sports teams --league NFL --limit 32
Order Book & Prices (No wallet needed)
获取 prices:
polymarket clob price 令牌_ID --side buy polymarket clob midpoint 令牌_ID polymarket clob spread 令牌_ID
Batch price queries:
polymarket clob batch-prices "令牌1,令牌2" --side buy polymarket clob midpoints "令牌1,令牌2" polymarket clob spreads "令牌1,令牌2"
Order book depth:
polymarket clob book 令牌_ID polymarket clob books "令牌1,令牌2"
Price 历史:
polymarket clob price-历史 令牌_ID --interval 1d --fidelity 30 # Intervals: 1m, 1h, 6h, 1d, 1w, max
Market metadata:
polymarket clob tick-size 令牌_ID polymarket clob fee-rate 令牌_ID polymarket clob neg-risk 令牌_ID polymarket clob last-trade 令牌_ID polymarket clob time polymarket clob ok # API 健康 检查 polymarket clob geoblock # 检查 if geo-restricted
Trading (Requires wallet)
Place a limit order:
polymarket clob 创建-order \ --令牌 令牌_ID \ --side buy --price 0.50 --size 10
Place a market order:
polymarket clob market-order \ --令牌 令牌_ID \ --side buy --amount 5
Place multiple orders at once:
polymarket clob post-orders \ --令牌s "令牌1,令牌2" \ --side buy \ --prices "0.40,0.60" \ --sizes "10,10"
Order types: GTC (default), FOK, GTD, FAK. 添加 --post-only for maker-only limit orders.
Cancel orders:
polymarket clob cancel ORDER_ID polymarket clob cancel-orders "ORDER1,ORDER2" polymarket clob cancel-market --market 0xCONDITION_ID polymarket clob cancel-all
View orders and trades:
polymarket clob orders polymarket cl