polymarket-prices
SKILL.md
Polymarket Prices
Real-time price data via CLOB API.
For foundational context, see
polymarket-references.
Get Price
curl -s "https://clob.polymarket.com/price?token_id=TOKEN_ID&side=BUY" | jq
Side: BUY or SELL
Get Multiple Prices
curl -s -X POST "https://clob.polymarket.com/prices" \
-H "Content-Type: application/json" \
-d '[{"token_id": "TOKEN_ID_1"}, {"token_id": "TOKEN_ID_2"}]' | jq
Get Orderbook
curl -s "https://clob.polymarket.com/book?token_id=TOKEN_ID" | jq '{bids: .bids[0:5], asks: .asks[0:5]}'
Response: bids[], asks[] each with price, size
Get Spread
curl -s "https://clob.polymarket.com/spread?token_id=TOKEN_ID" | jq
Get Midpoint
curl -s "https://clob.polymarket.com/midpoint?token_id=TOKEN_ID" | jq
Get Price History
curl -s "https://clob.polymarket.com/prices-history?market=TOKEN_ID&interval=1d&fidelity=60" | jq '.history[-10:]'
Intervals: 1h, 6h, 1d, 1w, max
Calculate Slippage
Fetch orderbook and calculate:
curl -s "https://clob.polymarket.com/book?token_id=TOKEN_ID" | jq '
.asks as $asks |
($asks | map(.size | tonumber) | add) as $total_liq |
($asks[0].price) as $best |
{best_ask: $best, total_ask_liquidity: $total_liq, depth: ($asks | length)}
'
Python Alternative
import httpx
CLOB = "https://clob.polymarket.com"
def get_price(token_id: str, side: str = "BUY"):
r = httpx.get(f"{CLOB}/price", params={"token_id": token_id, "side": side})
return r.json()
def get_orderbook(token_id: str):
r = httpx.get(f"{CLOB}/book", params={"token_id": token_id})
return r.json()
def get_spread(token_id: str):
r = httpx.get(f"{CLOB}/spread", params={"token_id": token_id})
return r.json()
def get_midpoint(token_id: str):
r = httpx.get(f"{CLOB}/midpoint", params={"token_id": token_id})
return r.json()
def get_price_history(token_id: str, interval: str = "1d"):
r = httpx.get(f"{CLOB}/prices-history", params={"market": token_id, "interval": interval})
return r.json().get("history", [])
Quick Orderbook Summary
TOKEN="YOUR_TOKEN_ID"
curl -s "https://clob.polymarket.com/book?token_id=$TOKEN" | jq '{
best_bid: .bids[0].price,
best_ask: .asks[0].price,
spread: ((.asks[0].price | tonumber) - (.bids[0].price | tonumber)),
bid_depth: ([.bids[].size | tonumber] | add),
ask_depth: ([.asks[].size | tonumber] | add)
}'
Weekly Installs
3
Repository
braindead-digit…t-skillsFirst Seen
Feb 19, 2026
Security Audits
Installed on
openclaw3
codex3
gemini-cli3
cursor3
opencode3
continue2