{“content”:”---\nname: polymarket\ndescription: Query Polymarket prediction market data — search markets, get prices, orderbooks, and price history. Read-only via public REST APIs, no API key needed.\nversion: 1.0.0\nauthor: Hermes Agent + Teknium\ntags: [polymarket, prediction-markets, market-data, trading]\n---\n\n# Polymarket — Prediction Market Data\n\nQuery prediction market data from Polymarket using their public REST APIs.\nAll endpoints are read-only and require zero authentication.\n\nSee references/api-endpoints.md for the full endpoint reference with curl examples.\n\n## When to Use\n\n- User asks about prediction markets, betting odds, or event probabilities\n- User wants to know “what are the odds of X happening?”\n- User asks about Polymarket specifically\n- User wants market prices, orderbook data, or price history\n- User asks to monitor or track prediction market movements\n\n## Key Concepts\n\n- Events contain one or more Markets (1:many relationship)\n- Markets are binary outcomes with Yes/No prices between 0.00 and 1.00\n- Prices ARE probabilities: price 0.65 means the market thinks 65% likely\n- outcomePrices field: JSON-encoded array like [\"0.80\", \"0.20\"]\n- clobTokenIds field: JSON-encoded array of two token IDs [Yes, No] for price/book queries\n- conditionId field: hex string used for price history queries\n- Volume is in USDC (US dollars)\n\n## Three Public APIs\n\n1. Gamma API at gamma-api.polymarket.com — Discovery, search, browsing\n2. CLOB API at clob.polymarket.com — Real-time prices, orderbooks, history\n3. Data API at data-api.polymarket.com — Trades, open interest\n\n## Typical Workflow\n\nWhen a user asks about prediction market odds:\n\n1. Search using the Gamma API public-search endpoint with their query\n2. Parse the response — extract events and their nested markets\n3. Present market question, current prices as percentages, and volume\n4. Deep dive if asked — use clobTokenIds for orderbook, conditionId for history\n\n## Presenting Results\n\nFormat prices as percentages for readability:\n- outcomePrices [\"0.652\", \"0.348\"] becomes “Yes: 65.2%, No: 34.8%“\n- Always show the market question and probability\n- Include volume when available\n\nExample: \"Will X happen?\" — 65.2% Yes ($1.2M volume)\n\n## Parsing Double-Encoded Fields\n\nThe Gamma API returns outcomePrices, outcomes, and clobTokenIds as JSON strings\ninside JSON responses (double-encoded). When processing with Python, parse them with\njson.loads(market['outcomePrices']) to get the actual array.\n\n## Rate Limits\n\nGenerous — unlikely to hit for normal usage:\n- Gamma: 4,000 requests per 10 seconds (general)\n- CLOB: 9,000 requests per 10 seconds (general)\n- Data: 1,000 requests per 10 seconds (general)\n\n## Limitations\n\n- This skill is read-only — it does not support placing trades\n- Trading requires wallet-based crypto authentication (EIP-712 signatures)\n- Some new markets may have empty price history\n- Geographic restrictions apply to trading but read-only data is globally accessible\n”}