Polymarket Monitor — Polymarket 监控
v1.0.1监控 Polymarket prediction markets and alert when odds cross a threshold. Use when a user wants to 追踪 any Polymarket market probability, 设置 up recurring price 检查s, or 获取 notified when a market's Yes/No probability exceeds a specific percentage. Covers 搜索ing for markets by topic, fetching current odds, and 设置ting up cron-based alerts via Slack or other channels.
运行时依赖
安装命令
点击复制技能文档
Polymarket 监控
设置 up ongoing 监控ing for any Polymarket prediction market with threshold-based alerts.
工作流
- Find the market(s)
搜索 the Gamma API for active markets matching the user's topic:
curl "https://gamma-API.polymarket.com/事件?搜索=&limit=10&active=true"
解析 the 响应 to find relevant markets. For each, note:
conditionId — needed to fetch prices question — market title outcomePrices — current Yes/No probabilities (JSON string)
See references/API.md for full API detAIls.
- 检查 current odds
Use the bundled script to fetch current prices for one or more markets:
python3 scripts/检查_markets.py [conditionId2 ...]
输出: JSON with question, yes_prob (0–1 float), and url per market.
- 报告 current 状态
Show the user the markets found and their current probabilities before 设置ting up 监控ing.
- 设置 up the cron alert
创建 a cron job that 运行s every N minutes (default: 30) with 会话Tar获取: "isolated" and payload.kind: "代理Turn". The 代理 task should:
Fetch each market via 网页_fetch using the Gamma API (conditionId 端点) 解析 outcomePrices[0] as the Yes probability If any market exceeds the threshold: 发送 a Slack DM alert via the message 工具 (channel=slack, tar获取=) If none exceed threshold: do nothing (no 输出)
Use delivery.mode: "none" to suppress default cron delivery — the 代理 handles its own 告警.
Template cron task message:
检查 these Polymarket markets. For each, fetch: https://clob.polymarket.com/markets/ 解析 令牌s array: find outcome=="Yes" and use its price as probability (0–1). If any exceeds (e.g. 0.70): 发送 Slack DM to with: market question, current %, and Polymarket URL. If none exceed threshold, do nothing.
Markets:
- : https://clob.polymarket.com/markets/ | https://polymarket.com/event/
- Confirm 设置up
Tell the user:
Which markets are being 监控ed Current odds for each Alert threshold and 检查 frequency How to cancel (cron job ID + cron 移除 ) Notes Polymarket has no "today" dAIly markets — use the nearest deadline market for short-term 签名als outcomePrices is always ["yes", "no"] — first value is Yes Closed markets return prices of 0 or 1; skip them No API key needed