$npx -y skills add mjunaidca/polymarket-skills --skill polymarket-monitorUse this skill whenever the user wants to monitor, watch, or track Polymarket prediction market prices over time. This includes setting up price alerts, watching for significant price movements, tracking spread changes, monitoring volume spikes, or getting notified about market a
| 1 | # Polymarket Monitor |
| 2 | |
| 3 | Monitor live Polymarket prediction markets for price changes, volume spikes, and spread movements. Outputs structured JSON alerts when thresholds are crossed. All endpoints are read-only and require no API keys. |
| 4 | |
| 5 | **Prerequisite:** This skill uses token IDs from the `polymarket-scanner` skill. Run `scan_markets.py` first to discover markets and obtain token IDs. |
| 6 | |
| 7 | ## Quick Start |
| 8 | |
| 9 | All scripts require the Python venv at `/home/verticalclaw/.venv`. |
| 10 | |
| 11 | ### Monitor Multiple Markets for Price Alerts |
| 12 | |
| 13 | ```bash |
| 14 | source /home/verticalclaw/.venv/bin/activate && python polymarket-monitor/scripts/monitor_prices.py \ |
| 15 | --token-id "<TOKEN_ID_1>" \ |
| 16 | --token-id "<TOKEN_ID_2>" \ |
| 17 | --interval 30 \ |
| 18 | --threshold 5.0 |
| 19 | ``` |
| 20 | |
| 21 | This polls every 30 seconds and prints a JSON alert whenever a token's midpoint moves more than 5% from its baseline. |
| 22 | |
| 23 | ### Watch a Single Market Live |
| 24 | |
| 25 | ```bash |
| 26 | source /home/verticalclaw/.venv/bin/activate && python polymarket-monitor/scripts/watch_market.py \ |
| 27 | --token-id "<TOKEN_ID>" \ |
| 28 | --interval 15 |
| 29 | ``` |
| 30 | |
| 31 | Prints a JSON snapshot every 15 seconds with price, spread, and order book depth. |
| 32 | |
| 33 | ## Scripts |
| 34 | |
| 35 | ### monitor_prices.py |
| 36 | |
| 37 | Polls multiple tokens at a set interval and emits JSON alerts when price changes exceed a threshold. |
| 38 | |
| 39 | **Arguments:** |
| 40 | - `--token-id ID` — CLOB token ID to monitor (repeatable, at least one required) |
| 41 | - `--interval N` — Polling interval in seconds (default: 30, minimum: 5) |
| 42 | - `--threshold N` — Percentage change to trigger an alert (default: 5.0) |
| 43 | - `--max-polls N` — Stop after N polls (default: unlimited, use for non-interactive runs) |
| 44 | - `--baseline-window N` — Number of recent prices to average for baseline (default: 1, meaning compare to last poll) |
| 45 | |
| 46 | **Output:** One JSON object per line for each alert: |
| 47 | ```json |
| 48 | { |
| 49 | "type": "price_alert", |
| 50 | "token_id": "...", |
| 51 | "timestamp": "2026-02-26T12:00:00Z", |
| 52 | "current_price": 0.65, |
| 53 | "baseline_price": 0.60, |
| 54 | "change_pct": 8.33, |
| 55 | "direction": "up", |
| 56 | "spread": 0.02, |
| 57 | "poll_number": 5 |
| 58 | } |
| 59 | ``` |
| 60 | |
| 61 | Non-alert polls print a status line to stderr so the agent knows monitoring is active. |
| 62 | |
| 63 | ### watch_market.py |
| 64 | |
| 65 | Continuously monitors a single market, printing a JSON snapshot each interval with price, spread, volume, and order book summary. |
| 66 | |
| 67 | **Arguments:** |
| 68 | - `--token-id ID` — CLOB token ID to watch (required) |
| 69 | - `--interval N` — Snapshot interval in seconds (default: 15, minimum: 5) |
| 70 | - `--max-polls N` — Stop after N snapshots (default: unlimited) |
| 71 | |
| 72 | **Output:** One JSON object per line per snapshot: |
| 73 | ```json |
| 74 | { |
| 75 | "type": "market_snapshot", |
| 76 | "token_id": "...", |
| 77 | "timestamp": "2026-02-26T12:00:00Z", |
| 78 | "midpoint": 0.55, |
| 79 | "best_bid": 0.54, |
| 80 | "best_ask": 0.56, |
| 81 | "spread": 0.02, |
| 82 | "bid_depth": 15000.0, |
| 83 | "ask_depth": 12000.0, |
| 84 | "last_trade_price": 0.55, |
| 85 | "last_trade_side": "BUY", |
| 86 | "poll_number": 1 |
| 87 | } |
| 88 | ``` |
| 89 | |
| 90 | ## Data Flow |
| 91 | |
| 92 | 1. Run `polymarket-scanner/scripts/scan_markets.py` to find markets and get token IDs |
| 93 | 2. Pass token IDs to `monitor_prices.py` for multi-market alerting |
| 94 | 3. Or pass a single token ID to `watch_market.py` for detailed single-market tracking |
| 95 | |
| 96 | ## Monitoring Guide |
| 97 | |
| 98 | For recommended thresholds by market type and advanced monitoring strategies, see `references/monitoring-guide.md`. |