Kheish Compatibility
This skill is repo-local and stays inactive until explicitly activated.
When the original instructions refer to legacy tool names, use these Kheish mappings:
terminal => bash
web_extract => web_fetch, plus web_search when discovery is needed
search_files => grep_search and glob_search
browser_* tools require a browser-capable surfaced tool or MCP; if none is available, use the closest available surface and say so explicitly
When the instructions mention local helper files, resolve them from ${KHEISH_SKILL_DIR}.
Polymarket — Prediction Market Data
Query prediction market data from Polymarket using their public REST APIs.
All endpoints are read-only and require zero authentication.
See references/api-endpoints.md for the full endpoint reference with curl examples.
When to Use
- User asks about prediction markets, betting odds, or event probabilities
- User wants to know "what are the odds of X happening?"
- User asks about Polymarket specifically
- User wants market prices, orderbook data, or price history
- User asks to monitor or track prediction market movements
Key Concepts
- Events contain one or more Markets (1:many relationship)
- Markets are binary outcomes with Yes/No prices between 0.00 and 1.00
- Prices ARE probabilities: price 0.65 means the market thinks 65% likely
outcomePrices field: JSON-encoded array like ["0.80", "0.20"]
clobTokenIds field: JSON-encoded array of two token IDs [Yes, No] for price/book queries
conditionId field: hex string used for price history queries
- Volume is in USDC (US dollars)
Three Public APIs
- Gamma API at
gamma-api.polymarket.com — Discovery, search, browsing
- CLOB API at
clob.polymarket.com — Real-time prices, orderbooks, history
- Data API at
data-api.polymarket.com — Trades, open interest
Typical Workflow
When a user asks about prediction market odds:
- Search using the Gamma API public-search endpoint with their query
- Parse the response — extract events and their nested markets
- Present market question, current prices as percentages, and volume
- Deep dive if asked — use clobTokenIds for orderbook, conditionId for history
Presenting Results
Format prices as percentages for readability:
- outcomePrices
["0.652", "0.348"] becomes "Yes: 65.2%, No: 34.8%"
- Always show the market question and probability
- Include volume when available
Example: "Will X happen?" — 65.2% Yes ($1.2M volume)
Parsing Double-Encoded Fields
The Gamma API returns outcomePrices, outcomes, and clobTokenIds as JSON strings
inside JSON responses (double-encoded). When processing with Python, parse them with
json.loads(market['outcomePrices']) to get the actual array.
Rate Limits
Generous — unlikely to hit for normal usage:
- Gamma: 4,000 requests per 10 seconds (general)
- CLOB: 9,000 requests per 10 seconds (general)
- Data: 1,000 requests per 10 seconds (general)
Limitations
- This skill is read-only — it does not support placing trades
- Trading requires wallet-based crypto authentication (EIP-712 signatures)
- Some new markets may have empty price history
- Geographic restrictions apply to trading but read-only data is globally accessible
1---2name: polymarket3description: Query Polymarket prediction market data — search markets, get prices, orderbooks, and price history. Read-only via public REST APIs, no API key needed.4---56## Kheish Compatibility78This skill is repo-local and stays inactive until explicitly activated.910When the original instructions refer to legacy tool names, use these Kheish mappings:1112- `terminal` => `bash`13- `web_extract` => `web_fetch`, plus `web_search` when discovery is needed14- `search_files` => `grep_search` and `glob_search`15- `browser_*` tools require a browser-capable surfaced tool or MCP; if none is available, use the closest available surface and say so explicitly1617When the instructions mention local helper files, resolve them from `${KHEISH_SKILL_DIR}`.1819# Polymarket — Prediction Market Data2021Query prediction market data from Polymarket using their public REST APIs.22All endpoints are read-only and require zero authentication.2324See `references/api-endpoints.md` for the full endpoint reference with curl examples.2526## When to Use2728- User asks about prediction markets, betting odds, or event probabilities29- User wants to know "what are the odds of X happening?"30- User asks about Polymarket specifically31- User wants market prices, orderbook data, or price history32- User asks to monitor or track prediction market movements3334## Key Concepts3536- **Events** contain one or more **Markets** (1:many relationship)37- **Markets** are binary outcomes with Yes/No prices between 0.00 and 1.0038- Prices ARE probabilities: price 0.65 means the market thinks 65% likely39- `outcomePrices` field: JSON-encoded array like `["0.80", "0.20"]`40- `clobTokenIds` field: JSON-encoded array of two token IDs [Yes, No] for price/book queries41- `conditionId` field: hex string used for price history queries42- Volume is in USDC (US dollars)4344## Three Public APIs45461. **Gamma API** at `gamma-api.polymarket.com` — Discovery, search, browsing472. **CLOB API** at `clob.polymarket.com` — Real-time prices, orderbooks, history483. **Data API** at `data-api.polymarket.com` — Trades, open interest4950## Typical Workflow5152When a user asks about prediction market odds:53541. **Search** using the Gamma API public-search endpoint with their query552. **Parse** the response — extract events and their nested markets563. **Present** market question, current prices as percentages, and volume574. **Deep dive** if asked — use clobTokenIds for orderbook, conditionId for history5859## Presenting Results6061Format prices as percentages for readability:62- outcomePrices `["0.652", "0.348"]` becomes "Yes: 65.2%, No: 34.8%"63- Always show the market question and probability64- Include volume when available6566Example: `"Will X happen?" — 65.2% Yes ($1.2M volume)`6768## Parsing Double-Encoded Fields6970The Gamma API returns `outcomePrices`, `outcomes`, and `clobTokenIds` as JSON strings71inside JSON responses (double-encoded). When processing with Python, parse them with72`json.loads(market['outcomePrices'])` to get the actual array.7374## Rate Limits7576Generous — unlikely to hit for normal usage:77- Gamma: 4,000 requests per 10 seconds (general)78- CLOB: 9,000 requests per 10 seconds (general)79- Data: 1,000 requests per 10 seconds (general)8081## Limitations8283- This skill is read-only — it does not support placing trades84- Trading requires wallet-based crypto authentication (EIP-712 signatures)85- Some new markets may have empty price history86- Geographic restrictions apply to trading but read-only data is globally accessible