简介
基于 Manifold Markets API 的预测市场交互工具,支持市场查询、概率追踪及资金交易,提供严格的二次确认机制保障交易安全。
原始描述
Read and trade on Manifold Markets (search markets, fetch probabilities, inspect users/bets, place bets/sell/comment). Never place a bet/sell/comment without explicit user confirmation.
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
中文使用说明 来自收录源
核心用法
Manifold skill 为纯 Markdown 文档型 Skill,封装了 Manifold Markets 预测市场平台的官方 API,分为读取和写入两大功能模块:
读取功能(无需认证):
- 搜索市场(
search-markets):按关键词检索预测市场列表 - 获取市场列表(
markets):查看最新市场 - 查询市场详情(
market/{id}或slug/{slug}):获取特定市场的概率、问题描述、交易数据等 - 用户信息查询(
user/{username}):查看公开用户资料 - 交易记录查询(
bets):获取特定用户的投注历史
写入功能(需 MANIFOLD_API_KEY):
- 下注(
bet):在二元市场押注 YES/NO - 卖出持仓(
sell):全部或部分卖出指定方向持仓 - 发表评论(
comment):在市场下添加评论
显著优点
- 零本地代码风险:纯 Markdown 封装,无可执行脚本,从根本上杜绝本地代码注入
- 官方 API 直联:13 个端点全部指向
api.manifold.markets官方域名,HTTPS 加密传输 - 强制用户确认机制:写入操作前必须获得用户显式确认("yes, place it"/"confirm"/"do it"),有效防止误操作
- 权限最小化:仅需
MANIFOLD_API_KEY,无系统敏感信息收集 - 预测市场生态整合:直接接入全球最大活跃预测市场平台之一,覆盖科技、政治、AI 安全等数万市场
潜在缺点与局限性
- 社区维护来源:由 clawdbot 组织维护(T3),非顶级开源基金会或知名大公司背书
- 外部 API 依赖:功能完全依赖 Manifold Markets 服务可用性,API 变更可能导致 skill 失效
- 金融操作风险:涉及真实资金(Mana 代币),API Key 泄露可能导致账户损失
- 有限的市场类型支持:文档主要针对二元市场示例,多选、数值型市场需查阅官方文档
- 评论可能产生费用:API 评论操作可能产生平台费用
适合人群
- 预测市场参与者:需要程序化查询市场、批量分析概率数据
- 量化研究者:获取历史交易数据进行策略回测
- AI 安全/政策研究者:跟踪特定领域(如 AI 风险)的群体预测
- 自动化交易员:在满足安全确认流程前提下,实现条件触发交易
常规风险
- API Key 泄露风险:环境变量或配置文件中的密钥需妥善保管
- 交易执行风险:即使有人工确认环节,大额交易仍需额外谨慎
- 平台政策变更风险:Manifold Markets 规则或费用结构调整可能影响使用成本
- 流动性风险:小众市场可能存在买卖价差大、成交困难的情况
技能正文
name: manifold description: Read and trade on Manifold Markets (search markets, fetch probabilities, inspect users/bets, place bets/sell/comment). Never place a bet/sell/comment without explicit user confirmation. homepage: https://manifold.markets metadata: { "openclaw": { "emoji": "🔮", "requires": { "bins": ["curl"], "env": ["MANIFOLD_API_KEY"] }, "primaryEnv": "MANIFOLD_API_KEY", }, }
Manifold Markets
Use this skill to read from Manifold Markets (search markets, fetch probabilities, inspect public user info) and to place trades/comments with explicit confirmation.
Write actions require MANIFOLD_API_KEY (in the environment or configured via OpenClaw skill entries).
Base URL: https://api.manifold.markets/v0
Docs: https://docs.manifold.markets/api
Read tasks
Search markets
curl -s "https://api.manifold.markets/v0/search-markets?term=AI+safety&limit=5"
Tip: replace spaces with + (or URL-encode). If you have jq, format results:
curl -s "https://api.manifold.markets/v0/search-markets?term=AI+safety&limit=5" | jq '.[] | {id, slug, question, outcomeType, probability, createdTime, creatorUsername}'
List newest markets
curl -s "https://api.manifold.markets/v0/markets?limit=10"
With jq:
curl -s "https://api.manifold.markets/v0/markets?limit=10" | jq '.[] | {id, slug, question, outcomeType, probability, closeTime}'
Get market details (by ID)
curl -s "https://api.manifold.markets/v0/market/MARKET_ID"
Binary markets usually expose probability (0..1). Other market types may not have a single probability field.
Get market details (by slug)
The slug is the portion of the Manifold URL after the username (e.g. .../Alice/my-market-slug → my-market-slug).
curl -s "https://api.manifold.markets/v0/slug/MARKET_SLUG"
Inspect a user (by username)
curl -s "https://api.manifold.markets/v0/user/USERNAME"
List bets for a user
If you have jq:
USER_ID="$(curl -s "https://api.manifold.markets/v0/user/USERNAME" | jq -r '.id')"
curl -s "https://api.manifold.markets/v0/bets?userId=$USER_ID&limit=50"
Without jq, fetch the user JSON and read the id field, then use it:
curl -s "https://api.manifold.markets/v0/user/USERNAME"
curl -s "https://api.manifold.markets/v0/bets?userId=USER_ID&limit=50"
Write safety rules
- Never place a bet, sell shares, or post a comment unless the user explicitly confirms (e.g. “yes, place it”, “confirm”, “do it”).
- Always fetch the market first and restate: market question, market id/slug, action (bet/sell/comment), side/answer, amount/shares, and any limits.
- If the user is not explicit about amount/side, stop and ask.
Write tasks
Authentication
- Uses
MANIFOLD_API_KEYin header:Authorization: Key $MANIFOLD_API_KEY - Set
MANIFOLD_API_KEY(orskills.manifold.apiKeyin~/.openclaw/openclaw.json).
Place a bet (binary market)
- Fetch the market and confirm it’s the right one:
curl -s "https://api.manifold.markets/v0/market/MARKET_ID"
- Preview the exact payload you intend to send (do not run the POST until user confirms):
cat <<'JSON'
{"amount":10,"contractId":"MARKET_ID","outcome":"YES"}
JSON
- After explicit confirmation, place the bet:
curl -s -X POST "https://api.manifold.markets/v0/bet" \
-H "Authorization: Key $MANIFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"amount":10,"contractId":"MARKET_ID","outcome":"YES"}'
Notes:
amountis in Mana (integer).outcomeisYESorNOfor binary markets.- For non-binary markets, consult the Manifold API docs for the correct payload.
Sell shares
Preview first (do not run until user confirms).
Sell all shares for an outcome (omit shares to sell all):
curl -s -X POST "https://api.manifold.markets/v0/market/MARKET_ID/sell" \
-H "Authorization: Key $MANIFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"outcome":"YES"}'
Sell a specific number of shares:
curl -s -X POST "https://api.manifold.markets/v0/market/MARKET_ID/sell" \
-H "Authorization: Key $MANIFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"outcome":"YES","shares":10}'
Post a comment
Comments made through the API can incur a fee (see Manifold API docs). Always confirm text + target market.
curl -s -X POST "https://api.manifold.markets/v0/comment" \
-H "Authorization: Key $MANIFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contractId":"MARKET_ID","content":"Your comment here."}'
Notes
- Rate limits apply (see Manifold API docs).
- Private/unlisted markets may not be accessible via the public API depending on current platform behavior.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。