Polymarket
2026-03-28
新闻来源:网淘吧
围观:31
电脑广告
手机广告
Polymarket
查询Polymarket预测市场与终端交易。
设置
只读命令可立即使用(无需安装)。
如需进行交易、查看订单簿和价格历史记录,请安装Polymarket CLI:
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-cli/main/install.sh | sh
进行交易前,请先设置钱包:
python3 {baseDir}/scripts/polymarket.py wallet-setup
或手动配置~/.config/polymarket/config.json文件,填入您的私钥。详情请参阅CLI 文档。
命令
浏览市场(无需 CLI)
# Trending/active markets
python3 {baseDir}/scripts/polymarket.py trending
# Search markets
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
订单簿与价格(需 CLI,无需钱包)
# Order book for a token
python3 {baseDir}/scripts/polymarket.py book TOKEN_ID
# Price history
python3 {baseDir}/scripts/polymarket.py price-history TOKEN_ID --interval 1d
钱包(需 CLI)
python3 {baseDir}/scripts/polymarket.py wallet-setup
python3 {baseDir}/scripts/polymarket.py wallet-show
python3 {baseDir}/scripts/polymarket.py wallet-balance
python3 {baseDir}/scripts/polymarket.py wallet-balance --token TOKEN_ID
交易(需 CLI 和钱包)
所有交易均需--confirm 确认执行。没有它,订单仅处于预览状态。
# Buy limit order: 10 shares at $0.50
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
python3 {baseDir}/scripts/polymarket.py --confirm trade buy --token TOKEN_ID --market-order --amount 5
订单与持仓(需要 CLI + 钱包)
# 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
聊天使用示例
- "特朗普赢得2028年大选的几率有多大?"
- "Polymarket 上有什么趋势?"
- "在 Polymarket 上搜索比特币"
- "显示 [代币] 的订单簿"
- "以 0.45 美元的价格买入 [市场] 的 10 份 YES 份额"
- "我的未平仓头寸有哪些?"
- "取消我所有的订单"
⚠️ 安全须知
- 真实资金。交易通过 Polygon 网络使用真实的 USDC 执行。请仔细核对所有信息。
- 所有交易都需要
--confirm参数。没有该参数,您将仅获得预览。 - CLI 处于实验阶段。Polymarket 团队警告:"使用风险自负,请勿使用大额资金。"
- 私钥安全。您的密钥存储在
~/.config/polymarket/config.json请妥善保管。 - Gas费用。链上操作(如授权、拆分、赎回)需要MATIC作为Gas。
API
只读命令使用公共Gamma API(无需认证):
- 基础URL:
https://gamma-api.polymarket.com
交易命令封装了官方的Polymarket CLI(Rust二进制文件)。
文章底部电脑广告
手机广告位-内容正文底部
上一篇:Apple Calendar CLI
下一篇:academic-writing


微信扫一扫,打赏作者吧~