polymarket
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePolymarket Prediction Markets
Polymarket预测市场
Browse, analyze, and trade on Polymarket — the world's largest prediction market platform on Polygon. Market prices represent crowd-implied probabilities (0.0-1.0 = 0%-100%) of real-world event outcomes.
Uses the official Polymarket Rust CLI for all operations.
在Polymarket——Polygon上全球最大的预测市场平台——进行浏览、分析和交易。市场价格代表现实世界事件结果的群体隐含概率(0.0-1.0对应0%-100%)。
所有操作均使用官方Polymarket Rust CLI完成。
Overview
概述
What you can do:
- 📊 Market Discovery - Browse active markets by volume, category, or recency
- 💰 Price Analysis - Get live probabilities, spreads, and liquidity depth
- 📈 Position Tracking - Monitor open positions with PnL
- 🔄 Trading - Place limit/market orders, manage positions
- 🔧 CTF Operations - Split, merge, and redeem conditional tokens on-chain
- ✅ Approvals - Manage contract approvals for trading
- 🌉 Bridge Deposits - Cross-chain deposits from EVM, Solana, Bitcoin
Authentication: Market data is public (no auth). Trading and on-chain operations require wallet configuration via commands.
polymarket wallet支持的操作:
- 📊 市场发现 - 按交易量、类别或创建时间浏览活跃市场
- 💰 价格分析 - 获取实时概率、点差和流动性深度
- 📈 持仓跟踪 - 监控未平仓头寸及盈亏(PnL)
- 🔄 交易 - 下达限价/市价订单、管理头寸
- 🔧 CTF操作 - 在链上拆分、合并和赎回条件代币
- ✅ 合约授权 - 管理交易所需的合约授权
- 🌉 跨链桥存款 - 从EVM、Solana、Bitcoin进行跨链存款
身份验证: 市场数据为公开信息(无需验证)。交易和链上操作需要通过命令配置钱包。
polymarket walletSetup & Configuration
设置与配置
1. Install the Polymarket CLI
1. 安装Polymarket CLI
The skill installer automatically installs the binary via:
bash
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-cli/main/install.sh | shOr install manually:
- Homebrew (macOS/Linux):
brew tap Polymarket/polymarket-cli && brew install polymarket - Build from source:
git clone https://github.com/Polymarket/polymarket-cli && cd polymarket-cli && cargo install --path .
技能安装器会通过以下命令自动安装二进制文件:
bash
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-cli/main/install.sh | sh或手动安装:
- Homebrew(macOS/Linux):
brew tap Polymarket/polymarket-cli && brew install polymarket - 从源码构建:
git clone https://github.com/Polymarket/polymarket-cli && cd polymarket-cli && cargo install --path .
2. Configure Your Wallet
2. 配置钱包
Option A: Import existing private key
bash
polymarket wallet import 0xYOUR_PRIVATE_KEYOption B: Create new wallet
bash
polymarket wallet createOption C: Use environment variable
bash
export POLYMARKET_PRIVATE_KEY=0xYOUR_PRIVATE_KEYThe configuration is stored at :
~/.config/polymarket/config.jsonjson
{
"private_key": "0x...",
"chain_id": 137,
"signature_type": "proxy"
}⚠️ IMPORTANT - No Agent Wallet Integration:
This skill does NOT support agent-managed wallets (like Privy or other embedded wallet systems). You must provide your own Ethereum/Polygon private key that you control directly. The agent cannot access or export wallet keys on your behalf.
Why? The Polymarket CLI requires direct private key access to sign transactions. For security, this skill does not integrate with any wallet abstraction layers.
选项A:导入现有私钥
bash
polymarket wallet import 0xYOUR_PRIVATE_KEY选项B:创建新钱包
bash
polymarket wallet create选项C:使用环境变量
bash
export POLYMARKET_PRIVATE_KEY=0xYOUR_PRIVATE_KEY配置文件存储在:
~/.config/polymarket/config.jsonjson
{
"private_key": "0x...",
"chain_id": 137,
"signature_type": "proxy"
}⚠️ 重要提示 - 不支持Agent钱包集成:
本技能不支持由Agent管理的钱包(如Privy或其他嵌入式钱包系统)。您必须提供自己直接控制的Ethereum/Polygon私钥。Agent无法代表您访问或导出钱包密钥。
原因: Polymarket CLI需要直接访问私钥来签署交易。为了安全起见,本技能不与任何钱包抽象层集成。
3. Set Contract Approvals (One-Time Setup)
3. 设置合约授权(一次性操作)
Before trading, approve Polymarket contracts for USDC and CTF tokens:
Check approval status:
polymarket_check_approvals()Set all approvals (requires MATIC for gas):
polymarket_set_approvals()This sends 6 on-chain transactions and only needs to be done once per wallet.
交易前,需为USDC和CTF代币授权Polymarket合约:
检查授权状态:
polymarket_check_approvals()设置所有授权(需要MATIC支付Gas费):
polymarket_set_approvals()这会发送6笔链上交易,每个钱包只需执行一次。
Tool Reference
工具参考
Market Discovery Tools (6) — No Auth Required
市场发现工具(6个)——无需验证
| Tool | Purpose | Required Params | Optional Params |
|---|---|---|---|
| Browse/filter markets to get valid slugs | (none) | |
| Get live probability + token IDs | | (none) |
| Get all sub-markets for an event | | (none) |
| Check orderbook depth & spread | | (none) |
| List all market categories | (none) | (none) |
| Top traders by profit | (none) | |
| 工具 | 用途 | 必填参数 | 可选参数 |
|---|---|---|---|
| 浏览/筛选市场以获取有效的slug | 无 | |
| 获取实时概率 + 代币ID | | 无 |
| 获取某一事件的所有子市场 | | 无 |
| 查看订单簿深度与点差 | | 无 |
| 列出所有市场类别 | 无 | 无 |
| 按利润排名的顶级交易者 | 无 | |
Trading Tools (8) — Require Wallet Configuration
交易工具(8个)——需要钱包配置
| Tool | Purpose | Required Params | Notes |
|---|---|---|---|
| Place GTC limit order | | Optional: |
| Place FOK market order | | Optional: |
| View open positions + PnL | | — |
| Check USDC balance | (none) | — |
| View open orders | (none) | Optional: |
| Trade history | (none) | Optional: |
| Cancel specific order | | — |
| Cancel ALL open orders | (none) | ⚠️ Use with caution |
| 工具 | 用途 | 必填参数 | 说明 |
|---|---|---|---|
| 下达GTC限价订单 | | 可选: |
| 下达FOK市价订单 | | 可选: |
| 查看未平仓头寸 + 盈亏 | | — |
| 查看USDC余额 | 无 | — |
| 查看未成交订单 | 无 | 可选: |
| 交易历史 | 无 | 可选: |
| 取消特定订单 | | — |
| 取消所有未成交订单 | 无 | ⚠️ 谨慎使用 |
Contract Approval Tools (2) — One-Time Setup
合约授权工具(2个)——一次性设置
| Tool | Purpose | Notes |
|---|---|---|
| Check ERC-20/ERC-1155 approval status | Optional: |
| Approve all contracts for trading | Sends 6 on-chain txs, requires MATIC gas |
| 工具 | 用途 | 说明 |
|---|---|---|
| 检查ERC-20/ERC-1155授权状态 | 可选: |
| 为交易授权所有合约 | 发送6笔链上交易,需要MATIC支付Gas费 |
CTF Token Operation Tools (3) — On-Chain Operations
CTF代币操作工具(3个)——链上操作
| Tool | Purpose | Required Params | Notes |
|---|---|---|---|
| Split USDC into outcome tokens | | Requires MATIC for gas |
| Merge tokens back to USDC | | Must hold BOTH outcome tokens |
| Redeem winning tokens after resolution | | Only for resolved markets |
| 工具 | 用途 | 必填参数 | 说明 |
|---|---|---|---|
| 将USDC拆分为结果代币 | | 需要MATIC支付Gas费 |
| 将代币合并回USDC | | 必须持有两种结果代币 |
| 市场结算后赎回获胜代币 | | 仅适用于已结算的市场 |
Bridge Deposit Tools (2) — Cross-Chain Deposits
跨链桥存款工具(2个)——跨链存款
| Tool | Purpose | Required Params | Notes |
|---|---|---|---|
| Get deposit addresses for bridging | | Supports EVM, Solana, Bitcoin |
| Check deposit status | | Shows pending/completed deposits |
| 工具 | 用途 | 必填参数 | 说明 |
|---|---|---|---|
| 获取跨链存款地址 | | 支持EVM、Solana、Bitcoin |
| 检查存款状态 | | 显示待处理/已完成的存款 |
Step-by-Step Workflows
分步工作流
Workflow 1: Check Event Probability (Read-Only)
工作流1:查询事件概率(只读)
User asks: "What are the odds Trump wins the 2024 election?"
Step 1: Find the market
polymarket_markets(status="active", sort="volume", limit=20)Result: Returns list with exact slugs:
json
{
"slug": "will-donald-trump-win-the-2024-us-presidential-election",
"question": "Will Donald Trump win the 2024 US Presidential Election?",
"outcomes": ["Yes", "No"]
}Step 2: Get live probability
polymarket_price(market_id="will-donald-trump-win-the-2024-us-presidential-election")Result: Returns current probability (e.g., 0.62 = 62% chance)
用户提问: "特朗普赢得2024年大选的概率是多少?"
步骤1:查找市场
polymarket_markets(status="active", sort="volume", limit=20)结果: 返回包含准确slug的列表:
json
{
"slug": "will-donald-trump-win-the-2024-us-presidential-election",
"question": "Will Donald Trump win the 2024 US Presidential Election?",
"outcomes": ["Yes", "No"]
}步骤2:获取实时概率
polymarket_price(market_id="will-donald-trump-win-the-2024-us-presidential-election")结果: 返回当前概率(例如,0.62 = 62%的概率)
Workflow 2: Deep Market Analysis
工作流2:深度市场分析
User asks: "How liquid is the Bitcoin $100K market?"
Step 1: Discover market
polymarket_markets(status="active", sort="volume", limit=10)Step 2: Get price + token ID
polymarket_price(market_id="<exact-slug-from-step-1>")Result: Returns array (e.g., for Yes/No)
clobTokenIds["123456", "789012"]Step 3: Check orderbook depth
polymarket_book(token_id="123456")Result: Returns bid/ask levels, spread, liquidity depth
用户提问: "比特币10万美元市场的流动性如何?"
步骤1:发现市场
polymarket_markets(status="active", sort="volume", limit=10)步骤2:获取价格 + 代币ID
polymarket_price(market_id="<exact-slug-from-step-1>")结果: 返回数组(例如,Yes/No对应的)
clobTokenIds["123456", "789012"]步骤3:查看订单簿深度
polymarket_book(token_id="123456")结果: 返回买卖盘档位、点差和流动性深度
Workflow 3: Place a Trade
工作流3:下达交易订单
User asks: "Buy $100 of Yes shares at 65%"
Prerequisites:
- Wallet configured:
polymarket wallet import 0x... - Approvals set:
polymarket_set_approvals()
Step 1: Find market + get token ID
polymarket_price(market_id="<exact-slug>")Step 2: Place limit order
polymarket_place_limit_order(
token_id="123456",
side="buy",
price=0.65,
size=153.85, # $100 / 0.65
post_only=false
)Alternative: Market order (instant execution)
polymarket_place_market_order(
token_id="123456",
side="buy",
amount=100, # $100 to spend
price=0.70 # worst acceptable price (slippage protection)
)用户提问: "以65%的价格买入100美元的Yes份额"
前提条件:
- 已配置钱包:
polymarket wallet import 0x... - 已设置授权:
polymarket_set_approvals()
步骤1:查找市场 + 获取代币ID
polymarket_price(market_id="<exact-slug>")步骤2:下达限价订单
polymarket_place_limit_order(
token_id="123456",
side="buy",
price=0.65,
size=153.85, # 100美元 / 0.65
post_only=false
)替代方案: 市价订单(即时成交)
polymarket_place_market_order(
token_id="123456",
side="buy",
amount=100, # 花费100美元
price=0.70 # 可接受的最差价格(滑点保护)
)Workflow 4: Split Collateral into Shares (On-Chain)
工作流4:将抵押品拆分为份额(链上操作)
User asks: "Convert $50 USDC into Yes/No shares for a market"
Prerequisites:
- Wallet configured and funded with USDC + MATIC (gas)
- Approvals set
Step 1: Get condition ID from market
polymarket_price(market_id="<market-slug>")Result: Extract or from response
conditionIdcondition_idStep 2: Split collateral
polymarket_ctf_split(
condition_id="0xABC123...",
amount=50
)Result: Transaction hash, you now hold 50 Yes + 50 No shares
Later: Merge back to USDC (if holding both):
polymarket_ctf_merge(
condition_id="0xABC123...",
amount=50
)用户提问: "将50美元USDC转换为某市场的Yes/No份额"
前提条件:
- 已配置钱包并充值USDC + MATIC(Gas费)
- 已设置授权
步骤1:从市场获取condition ID
polymarket_price(market_id="<market-slug>")结果: 从响应中提取或
conditionIdcondition_id步骤2:拆分抵押品
polymarket_ctf_split(
condition_id="0xABC123...",
amount=50
)结果: 交易哈希,您现在持有50份Yes + 50份No份额
后续操作: 合并回USDC(需持有两种份额):
polymarket_ctf_merge(
condition_id="0xABC123...",
amount=50
)Workflow 5: Redeem Winning Position
工作流5:赎回获胜头寸
User asks: "Market resolved, redeem my winning tokens"
Step 1: Check position
polymarket_get_positions(address="0xYOUR_ADDRESS")Step 2: Redeem (requires resolved market)
polymarket_ctf_redeem(condition_id="0xABC123...")Result: Winning tokens converted to USDC (1 token = $1)
用户提问: "市场已结算,赎回我的获胜代币"
步骤1:检查头寸
polymarket_get_positions(address="0xYOUR_ADDRESS")步骤2:赎回(需市场已结算)
polymarket_ctf_redeem(condition_id="0xABC123...")结果: 获胜代币转换为USDC(1代币=1美元)
Workflow 6: Bridge Deposits from Other Chains
工作流6:从其他链进行跨链存款
User asks: "How do I deposit USDC from Ethereum mainnet?"
Step 1: Get deposit addresses
polymarket_bridge_deposit(address="0xYOUR_POLYGON_ADDRESS")Result: Deposit addresses for EVM chains, Solana, Bitcoin
Step 2: Send assets to the provided deposit address (via wallet)
Step 3: Monitor status
polymarket_bridge_status(deposit_address="<address-from-step-1>")Result: Shows pending/completed deposits
用户提问: "如何从Ethereum主网存入USDC?"
步骤1:获取存款地址
polymarket_bridge_deposit(address="0xYOUR_POLYGON_ADDRESS")结果: 提供EVM链、Solana、Bitcoin的存款地址
步骤2:通过钱包将资产发送到提供的存款地址
步骤3:监控状态
polymarket_bridge_status(deposit_address="<address-from-step-1>")结果: 显示待处理/已完成的存款
Interpreting Prices
价格解读
Polymarket prices = probabilities. Each share pays $1 if the outcome occurs.
| Price Range | Interpretation |
|---|---|
| $0.90-$1.00 | Near-certain — strong consensus |
| $0.70-$0.89 | Strong consensus — likely to happen |
| $0.50-$0.69 | Lean yes, significant uncertainty |
| $0.30-$0.49 | Lean no, but uncertain |
| $0.01-$0.29 | Unlikely — market thinks probably not |
Polymarket价格=概率。每份份额若对应的结果发生则支付1美元。
| 价格区间 | 解读 |
|---|---|
| $0.90-$1.00 | 几乎确定——强烈共识 |
| $0.70-$0.89 | 强烈共识——很可能发生 |
| $0.50-$0.69 | 倾向于发生,存在显著不确定性 |
| $0.30-$0.49 | 倾向于不发生,但存在不确定性 |
| $0.01-$0.29 | 不太可能——市场认为大概率不会发生 |
Spread & Liquidity Analysis
点差与流动性分析
| Spread | Meaning |
|---|---|
| < $0.02 | Tight — reliable price signal, high confidence |
| $0.02-$0.05 | Normal — decent liquidity |
| $0.05-$0.10 | Wide — lower confidence, less liquid |
| > $0.10 | Very wide — unreliable, thin market |
Check to see actual depth. A tight spread with shallow depth can still be unreliable.
polymarket_book| 点差 | 含义 |
|---|---|
| < $0.02 | 窄点差——价格信号可靠,市场信心高 |
| $0.02-$0.05 | 正常——流动性良好 |
| $0.05-$0.10 | 宽点差——信心较低,流动性不足 |
| > $0.10 | 极宽点差——价格信号不可靠,市场稀薄 |
使用查看实际深度。窄点差但深度浅的市场仍然不可靠。
polymarket_bookMulti-Outcome & Negative Risk Markets
多结果与负风险市场
- Binary markets: Yes/No — prices sum to ~$1.00
- Multi-outcome: 3+ outcomes (e.g. "Who wins?") — all outcomes sum to ~$1.00
- Negative risk (): Market uses a special mechanism where shares are minted as a group. Prices still represent probabilities.
neg_risk=true
Always iterate all outcomes — never hardcode Yes/No.
- 二元市场:Yes/No——价格总和约为1.00美元
- 多结果市场:3种及以上结果(例如“谁会获胜?”)——所有结果价格总和约为1.00美元
- 负风险市场():市场使用特殊机制批量铸造份额,价格仍代表概率
neg_risk=true
始终遍历所有结果——不要硬编码Yes/No。
Common Patterns
常见应用模式
- Sentiment check: Prediction prices as leading indicators for crypto/political events
- Event risk assessment: Combine prediction market odds with crypto price data for risk analysis
- Contrarian signals: Extreme probabilities ($0.95+) with declining volume may indicate complacency
- Smart money tracking: Leaderboard reveals top traders and their performance
- 情绪检测:将预测价格作为加密货币/政治事件的领先指标
- 事件风险评估:结合预测市场赔率与加密货币价格数据进行风险分析
- 逆向信号:极端概率($0.95+)且交易量下降可能表明市场自满
- 聪明资金跟踪:排行榜揭示顶级交易者及其表现
Troubleshooting
故障排除
CLI Installation Issues
CLI安装问题
Error: "Polymarket CLI not found"
- Install via:
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-cli/main/install.sh | sh - Or use Homebrew:
brew tap Polymarket/polymarket-cli && brew install polymarket - Verify installation:
polymarket --version
错误:"Polymarket CLI not found"
- 通过以下命令安装:
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-cli/main/install.sh | sh - 或使用Homebrew:
brew tap Polymarket/polymarket-cli && brew install polymarket - 验证安装:
polymarket --version
Wallet Configuration Issues
钱包配置问题
Error: "Failed to derive credentials" or "No private key configured"
- Import your private key:
polymarket wallet import 0xYOUR_KEY - Or use environment variable:
export POLYMARKET_PRIVATE_KEY=0xYOUR_KEY - Check configuration:
polymarket wallet show
错误:"Failed to derive credentials"或"No private key configured"
- 导入私钥:
polymarket wallet import 0xYOUR_KEY - 或使用环境变量:
export POLYMARKET_PRIVATE_KEY=0xYOUR_KEY - 检查配置:
polymarket wallet show
Trading Errors
交易错误
| Error | Cause | Solution |
|---|---|---|
| "Insufficient allowance" | Contracts not approved | Run |
| "Insufficient balance" | Not enough USDC | Deposit USDC to your wallet |
| "Order failed" | Invalid price/size | Check token_id is correct, price is 0.01-0.99 |
| "Transaction failed" (CTF ops) | Out of MATIC for gas | Add MATIC to your Polygon wallet |
| 错误 | 原因 | 解决方案 |
|---|---|---|
| "Insufficient allowance" | 合约未授权 | 运行 |
| "Insufficient balance" | USDC余额不足 | 向钱包存入USDC |
| "Order failed" | 价格/份额无效 | 检查token_id是否正确,价格是否在0.01-0.99之间 |
| "Transaction failed"(CTF操作) | MATIC不足无法支付Gas费 | 向Polygon钱包添加MATIC |
Market Discovery Issues
市场发现问题
| Error | Cause | Solution |
|---|---|---|
| "Market not found" | Slug typo or market doesn't exist | Use |
| Empty results | Too restrictive filters | Broaden search criteria |
| 错误 | 原因 | 解决方案 |
|---|---|---|
| "Market not found" | slug拼写错误或市场不存在 | 使用 |
| 无结果 | 筛选条件过于严格 | 放宽搜索条件 |
On-Chain Operation Issues
链上操作问题
Error: "Insufficient funds for gas"
- CTF operations (split/merge/redeem) and approvals require MATIC on Polygon
- Get MATIC: Bridge from other chains or use faucets for testnet
Error: "Cannot merge - insufficient balance"
- Merging requires holding BOTH outcome tokens in equal amounts
- Check your positions:
polymarket_get_positions(address="0xYOUR_ADDRESS")
错误:"Insufficient funds for gas"
- CTF操作(拆分/合并/赎回)和授权需要Polygon上的MATIC
- 获取MATIC:从其他链跨桥或使用测试网水龙头
错误:"Cannot merge - insufficient balance"
- 合并操作需要持有等量的两种结果代币
- 查看您的头寸:
polymarket_get_positions(address="0xYOUR_ADDRESS")
Security Best Practices
安全最佳实践
🔒 Private Key Management:
- Never share your private key
- Store config file () securely
~/.config/polymarket/config.json - Use environment variables for temporary sessions
- Consider using a dedicated trading wallet with limited funds
⚠️ Trading Safety:
- Start with small amounts to test the integration
- Always verify market details before placing orders
- Use for limit orders to avoid unexpected fills
post_only - Set slippage limits on market orders via the parameter
price
🔐 On-Chain Operations:
- Verify condition IDs carefully before CTF operations
- Keep some MATIC for gas fees (CTF ops typically cost ~$0.10-0.50)
- Test approvals on small amounts first
🔒 私钥管理:
- 切勿分享您的私钥
- 安全存储配置文件()
~/.config/polymarket/config.json - 临时会话使用环境变量
- 考虑使用专用交易钱包并限制资金量
⚠️ 交易安全:
- 先小额交易测试集成功能
- 下达订单前始终验证市场详情
- 限价订单使用避免意外成交
post_only - 通过参数为市价订单设置滑点限制
price
🔐 链上操作:
- CTF操作前仔细验证condition ID
- 保留一些MATIC用于Gas费(CTF操作通常花费约0.10-0.50美元)
- 先小额测试授权操作
CLI Command Reference
CLI命令参考
For advanced users who want to use the CLI directly:
Market discovery:
polymarket markets list --limit 10polymarket markets search "bitcoin"polymarket markets get <slug>
Trading:
polymarket clob create-order --token <id> --side buy --price 0.5 --size 10polymarket clob orderspolymarket clob balance --asset-type collateral
CTF operations:
polymarket ctf split --condition 0x... --amount 10polymarket ctf merge --condition 0x... --amount 10polymarket ctf redeem --condition 0x...
Approvals:
polymarket approve checkpolymarket approve set
JSON output (for scripting):
- Add to any command:
-o jsonpolymarket -o json markets list --limit 5
See full CLI docs: https://github.com/Polymarket/polymarket-cli
供希望直接使用CLI的高级用户参考:
市场发现:
polymarket markets list --limit 10polymarket markets search "bitcoin"polymarket markets get <slug>
交易:
polymarket clob create-order --token <id> --side buy --price 0.5 --size 10polymarket clob orderspolymarket clob balance --asset-type collateral
CTF操作:
polymarket ctf split --condition 0x... --amount 10polymarket ctf merge --condition 0x... --amount 10polymarket ctf redeem --condition 0x...
授权:
polymarket approve checkpolymarket approve set
JSON输出(用于脚本):
- 向任何命令添加:
-o jsonpolymarket -o json markets list --limit 5
Additional Resources
额外资源
- Official CLI Repo: https://github.com/Polymarket/polymarket-cli
- Polymarket Platform: https://polymarket.com
- Documentation: https://docs.polymarket.com
- Discord: https://discord.gg/polymarket
- 官方CLI仓库:https://github.com/Polymarket/polymarket-cli
- Polymarket平台:https://polymarket.com
- 文档:https://docs.polymarket.com
- Discord社区:https://discord.gg/polymarket