跳到正文
Skillpedia
分析与电子表格23k · #10138

polymarket-public-data

它能做什么

这项技能说明如何查找 Polymarket 市场并读取其公开订单簿价格,直接访问 Polymarket,而不经过 AI-Trader。适合关注预测市场的人。

适用场景

  • ✓当你想通过 slug 或条件 ID 查询某个 Polymarket 问题时。
  • ✓当你需要某个 Polymarket 结果的当前价格时。
  • ✓当你在核对 Polymarket 价格后,想在 AI-Trader 上记录一笔模拟交易时。

技能链接

https://github.com/HKUDS/AI-Trader/blob/main/skills/polymarket/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/HKUDS/AI-Trader/blob/main/skills/polymarket/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请查找关于 6 月 30 日 BTC 高于 12 万美元的 Polymarket 市场,并告诉我 Yes 的价格。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会在 Polymarket 的公开列表中找到该市场,把选定的结果与其代币 ID 对应起来,并读取最佳买价和卖价,计算中间价。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Polymarket Public Data

Use this skill when you need Polymarket market metadata, outcome tokens, or public orderbook prices.

Important:

  • Do not query AI-Trader for Polymarket market discovery
  • Read directly from Polymarket public APIs
  • Use AI-Trader only to publish simulated trades after you have resolved the market and outcome locally

Public Endpoints

  • Gamma markets API: https://gamma-api.polymarket.com/markets
  • CLOB orderbook API: https://clob.polymarket.com/book

Resolve a Market

Use one of these references:

  • slug
  • conditionId
  • token_id

Examples:

curl "https://gamma-api.polymarket.com/markets?slug=will-btc-be-above-120k-on-june-30"
curl "https://gamma-api.polymarket.com/markets?conditionId=0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"

Read these fields from the result:

  • question
  • slug
  • outcomes
  • clobTokenIds

Pair outcomes[i] with clobTokenIds[i] to identify the exact outcome token.

Get an Outcome Price

After resolving the outcome token:

curl "https://clob.polymarket.com/book?token_id=123456789"

Use the best bid/ask to derive a mid price.

Recommended Agent Flow

  1. Resolve the market with Gamma using slug or conditionId
  2. Choose a concrete outcome such as Yes or No
  3. Read the corresponding token_id
  4. Query the CLOB orderbook directly from Polymarket
  5. When publishing to AI-Trader, send:
    • market: "polymarket"
    • symbol: <slug or conditionId>
    • outcome: <Yes/No/etc>
    • optional token_id if already known

AI-Trader Publishing Example

{
  "market": "polymarket",
  "action": "buy",
  "symbol": "will-btc-be-above-120k-on-june-30",
  "outcome": "Yes",
  "token_id": "123456789",
  "price": 0,
  "quantity": 20,
  "executed_at": "now"
}

This keeps market-discovery traffic on Polymarket infrastructure and only uses AI-Trader for simulated execution and social sharing.

常见问题

它使用 AI-Trader 查找市场吗?

不使用。技能说明,不应通过 AI-Trader 查询 Polymarket 市场。

中间价是如何计算的?

智能体使用公开订单簿中的最佳买价和卖价,推算出中间价。

什么是代币 ID?

它用于标识市场中的一个结果,例如 Yes 或 No,技能会把每个结果与其代币对应起来。

详情

作者的原始描述

Read Polymarket public market metadata and orderbook prices directly from Polymarket APIs without routing traffic through AI-Trader.

repo: HKUDS/AI-Trader

热度

GitHub 星标
23k
排名
#10138
许可证
—
更新时间
2026/6/11

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能