Polymarket Council
Query, analyze, and trade on Polymarket — the world's largest prediction market.
Read-only commands work immediately — no API keys, no install, no setup.
Quick Start
CODEBLOCK0
Commands
Market Discovery (no setup needed)
CODEBLOCK1
Prices & Order Books (no setup needed)
CODEBLOCK2
Analytics (no setup needed)
CODEBLOCK3
Trading (requires wallet setup)
First-time setup:
CODEBLOCK4
This creates ~/.config/polymarket/wallet.json with your private key (Polygon).
CODEBLOCK5
Example Chat Usage
- - "What are the odds Trump wins the 2028 election?"
- "Show me trending markets on Polymarket"
- "Search Polymarket for Bitcoin price predictions"
- "What are the current crypto markets on Polymarket?"
- "Show the order book for [token]"
- "What's the price history for this market over the last week?"
- "Who are the top traders on Polymarket?"
- "Show me open interest for [market]"
- "Buy 10 shares of YES at $0.45 on [market]"
- "What are my positions?"
API Reference
Read-only commands use public APIs (no auth required):
| API | Base URL | Purpose |
|---|
| Gamma | INLINECODE1 | Markets, events, tags, search, profiles |
| Data |
https://data-api.polymarket.com | Positions, trades, activity, leaderboards |
| CLOB |
https://clob.polymarket.com | Order books, prices, spreads, price history |
Trading commands use authenticated CLOB API endpoints.
Safety Notes
- - Real money. Polymarket trades use real USDC on Polygon. Double-check before confirming.
- All trades require
--confirm. Without it, you only see a preview. - Private key security. Your key is stored in
~/.config/polymarket/wallet.json. Protect it. - Gas fees. On-chain operations require MATIC/POL for gas on Polygon.
- Not financial advice. This tool provides market data. Make your own decisions.
Polymarket 理事会
查询、分析并在 Polymarket(全球最大的预测市场)上进行交易。
只读命令可立即使用 — 无需 API 密钥、无需安装、无需设置。
快速入门
bash
当前热门话题
python3 {baseDir}/scripts/polymarket.py trending
搜索任意主题
python3 {baseDir}/scripts/polymarket.py search 比特币
获取特定市场的详细赔率
python3 {baseDir}/scripts/polymarket.py market CONDITION_ID
价格历史
python3 {baseDir}/scripts/polymarket.py history TOKEN_ID --interval 1d --fidelity 60
命令
市场发现(无需设置)
bash
按交易量排序的热门市场
python3 {baseDir}/scripts/polymarket.py trending [--limit 20]
按关键词搜索市场
python3 {baseDir}/scripts/polymarket.py search 查询内容 [--limit 10]
按类别/标签浏览
python3 {baseDir}/scripts/polymarket.py category 标签 [--limit 20]
标签:政治、加密货币、体育、流行文化、商业、科学、世界、人工智能、选举
获取完整事件详情(事件中的所有市场)
python3 {baseDir}/scripts/polymarket.py event 别名或ID
获取单个市场的详情 + 当前价格
python3 {baseDir}/scripts/polymarket.py market CONDITION_ID
列出活跃事件
python3 {baseDir}/scripts/polymarket.py events [--limit 20] [--tag 标签]
价格与订单簿(无需设置)
bash
代币的当前价格/赔率
python3 {baseDir}/scripts/polymarket.py price TOKEN_ID
多个代币的批量价格
python3 {baseDir}/scripts/polymarket.py prices TOKEN
ID1 TOKENID2 ...
价差(最佳卖价 - 最佳买价)
python3 {baseDir}/scripts/polymarket.py spread TOKEN_ID
完整订单簿(买单 + 卖单)
python3 {baseDir}/scripts/polymarket.py book TOKEN_ID
价格历史走势
python3 {baseDir}/scripts/polymarket.py history TOKEN_ID [--interval 1d] [--fidelity 60]
时间间隔:1m、5m、1h、1d、1w | 精度:数据点之间的分钟数
最后交易价格
python3 {baseDir}/scripts/polymarket.py last-trade TOKEN_ID
分析(无需设置)
bash
市场的未平仓合约
python3 {baseDir}/scripts/polymarket.py open-interest CONDITION_ID
代币的顶级持有者
python3 {baseDir}/scripts/polymarket.py holders TOKEN_ID [--limit 10]
事件的实时交易量
python3 {baseDir}/scripts/polymarket.py volume EVENT_ID
排行榜
python3 {baseDir}/scripts/polymarket.py leaderboard [--limit 20]
交易者的公开资料
python3 {baseDir}/scripts/polymarket.py profile 地址
交易者的活动/交易历史
python3 {baseDir}/scripts/polymarket.py activity 地址 [--limit 20]
交易(需要钱包设置)
首次设置:
bash
python3 {baseDir}/scripts/polymarket.py wallet-setup
这将在 ~/.config/polymarket/wallet.json 中创建包含您的私钥(Polygon 网络)的文件。
bash
查看钱包余额
python3 {baseDir}/scripts/polymarket.py balance
买入限价单 — 仅预览(不带 --confirm)
python3 {baseDir}/scripts/polymarket.py trade buy --token TOKEN_ID --price 0.50 --size 10
买入限价单 — 执行(带 --confirm)
python3 {baseDir}/scripts/polymarket.py trade buy --token TOKEN_ID --price 0.50 --size 10 --confirm
卖出限价单
python3 {baseDir}/scripts/polymarket.py trade sell --token TOKEN_ID --price 0.70 --size 10 --confirm
市价单 — 以最佳可用价格买入价值 5 美元
python3 {baseDir}/scripts/polymarket.py trade buy --token TOKEN_ID --amount 5 --market-order --confirm
查看未成交订单
python3 {baseDir}/scripts/polymarket.py orders [--address 地址]
取消订单
python3 {baseDir}/scripts/polymarket.py cancel ORDER_ID --confirm
取消所有订单
python3 {baseDir}/scripts/polymarket.py cancel-all --confirm
查看持仓
python3 {baseDir}/scripts/polymarket.py positions [--address 地址]
聊天使用示例
- - 特朗普赢得 2028 年大选的赔率是多少?
- 显示 Polymarket 上的热门市场
- 在 Polymarket 上搜索比特币价格预测
- Polymarket 上当前的加密货币市场有哪些?
- 显示 [代币] 的订单簿
- 这个市场过去一周的价格历史如何?
- Polymarket 上的顶级交易者是谁?
- 显示 [市场] 的未平仓合约
- 在 [市场] 以 0.45 美元买入 10 份 YES
- 我的持仓是什么?
API 参考
只读命令使用公开 API(无需认证):
| API | 基础 URL | 用途 |
|---|
| Gamma | https://gamma-api.polymarket.com | 市场、事件、标签、搜索、资料 |
| Data |
https://data-api.polymarket.com | 持仓、交易、活动、排行榜 |
| CLOB | https://clob.polymarket.com | 订单簿、价格、价差、价格历史 |
交易命令使用经过认证的 CLOB API 端点。
安全提示
- - 真实资金。 Polymarket 交易使用 Polygon 网络上的真实 USDC。确认前请仔细核对。
- 所有交易都需要 --confirm。 不带此参数时,您只能看到预览。
- 私钥安全。 您的密钥存储在 ~/.config/polymarket/wallet.json 中。请妥善保护。
- Gas 费用。 链上操作需要 MATIC/POL 作为 Polygon 网络的 Gas 费用。
- 非财务建议。 此工具提供市场数据。请自行做出决策。