$npx -y skills add adityahimaone/hermes-agent-rtk-caveman --skill polymarketQuery Polymarket prediction market data — search markets, get prices, orderbooks, and price history. Read-only via public REST APIs, no API key needed.
| 1 | # Polymarket — Prediction Market Data |
| 2 | |
| 3 | Query prediction market data from Polymarket using their public REST APIs. |
| 4 | All endpoints are read-only and require zero authentication. |
| 5 | |
| 6 | See `references/api-endpoints.md` for the full endpoint reference with curl examples. |
| 7 | |
| 8 | ## When to Use |
| 9 | |
| 10 | - User asks about prediction markets, betting odds, or event probabilities |
| 11 | - User wants to know "what are the odds of X happening?" |
| 12 | - User asks about Polymarket specifically |
| 13 | - User wants market prices, orderbook data, or price history |
| 14 | - User asks to monitor or track prediction market movements |
| 15 | |
| 16 | ## Key Concepts |
| 17 | |
| 18 | - **Events** contain one or more **Markets** (1:many relationship) |
| 19 | - **Markets** are binary outcomes with Yes/No prices between 0.00 and 1.00 |
| 20 | - Prices ARE probabilities: price 0.65 means the market thinks 65% likely |
| 21 | - `outcomePrices` field: JSON-encoded array like `["0.80", "0.20"]` |
| 22 | - `clobTokenIds` field: JSON-encoded array of two token IDs [Yes, No] for price/book queries |
| 23 | - `conditionId` field: hex string used for price history queries |
| 24 | - Volume is in USDC (US dollars) |
| 25 | |
| 26 | ## Three Public APIs |
| 27 | |
| 28 | 1. **Gamma API** at `gamma-api.polymarket.com` — Discovery, search, browsing |
| 29 | 2. **CLOB API** at `clob.polymarket.com` — Real-time prices, orderbooks, history |
| 30 | 3. **Data API** at `data-api.polymarket.com` — Trades, open interest |
| 31 | |
| 32 | ## Typical Workflow |
| 33 | |
| 34 | When a user asks about prediction market odds: |
| 35 | |
| 36 | 1. **Search** using the Gamma API public-search endpoint with their query |
| 37 | 2. **Parse** the response — extract events and their nested markets |
| 38 | 3. **Present** market question, current prices as percentages, and volume |
| 39 | 4. **Deep dive** if asked — use clobTokenIds for orderbook, conditionId for history |
| 40 | |
| 41 | ## Presenting Results |
| 42 | |
| 43 | Format prices as percentages for readability: |
| 44 | - outcomePrices `["0.652", "0.348"]` becomes "Yes: 65.2%, No: 34.8%" |
| 45 | - Always show the market question and probability |
| 46 | - Include volume when available |
| 47 | |
| 48 | Example: `"Will X happen?" — 65.2% Yes ($1.2M volume)` |
| 49 | |
| 50 | ## Parsing Double-Encoded Fields |
| 51 | |
| 52 | The Gamma API returns `outcomePrices`, `outcomes`, and `clobTokenIds` as JSON strings |
| 53 | inside JSON responses (double-encoded). When processing with Python, parse them with |
| 54 | `json.loads(market['outcomePrices'])` to get the actual array. |
| 55 | |
| 56 | ## Rate Limits |
| 57 | |
| 58 | Generous — unlikely to hit for normal usage: |
| 59 | - Gamma: 4,000 requests per 10 seconds (general) |
| 60 | - CLOB: 9,000 requests per 10 seconds (general) |
| 61 | - Data: 1,000 requests per 10 seconds (general) |
| 62 | |
| 63 | ## Limitations |
| 64 | |
| 65 | - This skill is read-only — it does not support placing trades |
| 66 | - Trading requires wallet-based crypto authentication (EIP-712 signatures) |
| 67 | - Some new markets may have empty price history |
| 68 | - Geographic restrictions apply to trading but read-only data is globally accessible |