{"skill":{"slug":"polymarket-monitor","displayName":"Polymarket Monitor","summary":"Monitor Polymarket prediction markets and alert when odds cross a threshold. Use when a user wants to track any Polymarket market probability, set up recurri...","description":"---\nname: polymarket-monitor\ndescription: Monitor Polymarket prediction markets and alert when odds cross a threshold. Use when a user wants to track any Polymarket market probability, set up recurring price checks, or get notified when a market's Yes/No probability exceeds a specific percentage. Covers searching for markets by topic, fetching current odds, and setting up cron-based alerts via Slack or other channels.\n---\n\n# Polymarket Monitor\n\nSet up ongoing monitoring for any Polymarket prediction market with threshold-based alerts.\n\n## Workflow\n\n### 1. Find the market(s)\n\nSearch the Gamma API for active markets matching the user's topic:\n\n```bash\ncurl \"https://gamma-api.polymarket.com/events?search=<topic>&limit=10&active=true\"\n```\n\nParse the response to find relevant markets. For each, note:\n- `conditionId` — needed to fetch prices\n- `question` — market title\n- `outcomePrices` — current Yes/No probabilities (JSON string)\n\nSee `references/api.md` for full API details.\n\n### 2. Check current odds\n\nUse the bundled script to fetch current prices for one or more markets:\n\n```bash\npython3 scripts/check_markets.py <conditionId1> [conditionId2 ...]\n```\n\nOutput: JSON with `question`, `yes_prob` (0–1 float), and `url` per market.\n\n### 3. Report current state\n\nShow the user the markets found and their current probabilities before setting up monitoring.\n\n### 4. Set up the cron alert\n\nCreate a cron job that runs every N minutes (default: 30) with `sessionTarget: \"isolated\"` and `payload.kind: \"agentTurn\"`. The agent task should:\n\n1. Fetch each market via `web_fetch` using the Gamma API (conditionId endpoint)\n2. Parse `outcomePrices[0]` as the Yes probability\n3. If any market exceeds the threshold: send a Slack DM alert via the `message` tool (channel=slack, target=<user_id>)\n4. If none exceed threshold: do nothing (no output)\n\nUse `delivery.mode: \"none\"` to suppress default cron delivery — the agent handles its own alerting.\n\n**Template cron task message:**\n\n```\nCheck these Polymarket markets. For each, fetch:\n  https://clob.polymarket.com/markets/<conditionId>\nParse tokens array: find outcome==\"Yes\" and use its price as probability (0–1).\nIf any exceeds <threshold> (e.g. 0.70):\n  Send Slack DM to <user_slack_id> with: market question, current %, and Polymarket URL.\nIf none exceed threshold, do nothing.\n\nMarkets:\n- <question>: https://clob.polymarket.com/markets/<conditionId> | https://polymarket.com/event/<slug>\n```\n\n### 5. Confirm setup\n\nTell the user:\n- Which markets are being monitored\n- Current odds for each\n- Alert threshold and check frequency\n- How to cancel (cron job ID + `cron remove <id>`)\n\n## Notes\n\n- Polymarket has no \"today\" daily markets — use the nearest deadline market for short-term signals\n- `outcomePrices` is always `[\"yes\", \"no\"]` — first value is Yes\n- Closed markets return prices of 0 or 1; skip them\n- No API key needed\n","tags":{"latest":"1.0.1"},"stats":{"comments":0,"downloads":1432,"installsAllTime":5,"installsCurrent":5,"stars":0,"versions":2},"createdAt":1771512927047,"updatedAt":1778991681112},"latestVersion":{"version":"1.0.1","createdAt":1771848475768,"changelog":"Fix: replaced spoofed User-Agent with honest identifier; added conditionId input validation to prevent injection","license":null},"metadata":null,"owner":{"handle":"xmeir-dev","userId":"s171ahvjdh7nzrbg9gnmw99ng1885g42","displayName":"Meir Rosenschein","image":"https://avatars.githubusercontent.com/u/229780782?v=4"},"moderation":null}