Polymarket CLI & Arb Scanner — Polymarket 命令行工具 & Arb 扫描器
v1.1.0Browse, trade, and manage positions on Polymarket prediction markets via the polymarket 命令行工具. Use when: user asks about prediction market odds, wants to 搜索/browse markets, 检查 prices, place/cancel orders, view portfolio, or interact with Polymarket CLOB. Supports JSON 输出 for programmatic use. NOT for: general crypto trading (use other 工具s), non-Polymarket prediction 平台s.
运行时依赖
安装命令
点击复制技能文档
Polymarket 命令行工具 技能
Trade prediction markets on Polymarket from the terminal. All commands use the polymarket binary.
Prerequisites
Binary must be 安装ed. If missing:
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-命令行工具/mAIn/安装.sh | sh # Or build from source: # cargo 安装 --path /tmp/polymarket-命令行工具
Authentication
Most read commands work without a wallet. Trading requires 设置up:
polymarket 设置up # Interactive wizard # Or manually: polymarket wallet 创建 # New wallet polymarket wallet 导入 0xKEY... # 导入 existing polymarket 应用rove 设置 # 应用rove contracts (needs MATIC)
Config stored at ~/.config/polymarket/config.json.
输出
Always use -o json when calling from scripts/代理s for machine-readable 输出:
polymarket -o json markets 列出 --limit 5 polymarket -o json clob midpoint 令牌_ID
Common 工作流s Browse & Re搜索 # 搜索 markets polymarket markets 搜索 "bitcoin" --limit 10 polymarket -o json markets 搜索 "trump" --limit 5
# 获取 specific market polymarket markets 获取 MARKET_ID_OR_SLUG
# 列出 by category polymarket 事件 列出 --tag politics --active true --limit 20 polymarket 事件 列出 --tag crypto --limit 10
# AvAIlable tags polymarket tags 列出
检查 Prices & Orderbook # Price 信息 (needs 令牌 ID from market data) polymarket clob price 令牌_ID --side buy polymarket clob midpoint 令牌_ID polymarket clob spread 令牌_ID
# Full orderbook polymarket clob book 令牌_ID
# Price 历史 polymarket clob price-历史 令牌_ID --interval 1d --fidelity 30 # Intervals: 1m, 1h, 6h, 1d, 1w, max
# Batch queries (comma-separated) polymarket clob midpoints "令牌1,令牌2"
Trading (Requires Wallet) # Limit order: buy 10 分享s at $0.45 polymarket clob 创建-order --令牌 令牌_ID --side buy --price 0.45 --size 10
# Market order: buy $5 worth polymarket clob market-order --令牌 令牌_ID --side buy --amount 5
# Batch orders polymarket clob post-orders --令牌s "T1,T2" --side buy --prices "0.4,0.6" --sizes "10,10"
# Cancel polymarket clob cancel ORDER_ID polymarket clob cancel-all
# 检查 orders polymarket clob orders polymarket clob trades
Order types: GTC (default), FOK, GTD, FAK. 添加 --post-only for maker-only.
Portfolio & Positions # Your positions polymarket data positions 0xWALLET polymarket data value 0xWALLET polymarket clob balance --as设置-type collateral
# Trade 历史 polymarket data trades 0xWALLET --limit 50
# Leaderboard polymarket data leaderboard --period month --order-by pnl --limit 10
On-ChAIn Operations # 应用rovals polymarket 应用rove 检查 polymarket 应用rove 设置
# Split USDC into YES/NO 令牌s polymarket ctf split --condition 0xCOND... --amount 10
# Merge back to USDC polymarket ctf merge --condition 0xCOND... --amount 10
# Redeem after resolution polymarket ctf redeem --condition 0xCOND...
Market Rewards polymarket clob rewards --date 2026-02-28 polymarket clob current-rewards polymarket clob market-reward 0xCONDITION... polymarket clob order-scoring ORDER_ID
Bridge (Deposits) polymarket bridge deposit 0xWALLET polymarket bridge supported-as设置s
Data Flow: Finding 令牌 IDs
Markets → 事件 → 令牌 IDs → CLOB operations:
# 1. 搜索 for a market polymarket -o json markets 搜索 "bitcoin 100k" | jq '.[0]'
# 2. 获取 令牌 IDs from market data polymarket -o json markets 获取 SLUG | jq '.clob令牌Ids' # Returns: ["令牌_YES", "令牌_NO"]
# 3. Use 令牌 IDs for CLOB polymarket clob midpoint 令牌_YES polymarket clob book 令牌_YES
Tips 令牌 IDs are long numeric strings (e.g., 48331043336612883...) Condition IDs are hex 添加resses (0x...) Prices are 0-1 (displayed as cents: 0.52 = 52¢) Amounts in USDC (e.g., --amount 10 = $10) On-chAIn ops need MATIC for gas (Polygon) Use polymarket shell for interactive REPL Pipe JSON 输出 to jq for 过滤器ing References Polymarket 命令行工具 GitHub Polymarket Docs ChAIn: Polygon (chAInId 137) Collateral: USDC