Polymarket API

Get Polymarket data as clean JSON with one key: 14 endpoints, 1 to 5 credits per call, the same response shape as every other platform.

What you get#

Onekey exposes Polymarket as 14 endpoints behind one API key: 8 endpoints return one record (data is an object) and 6 endpoints return a list (data is an array). Every answer uses the same envelope (success, data, metadata, error), the cost is reported in metadata.credits_charged, and fields are mapped onto the unified schema so the code you write for Polymarket also works for the rest of the finance & markets category.

Endpoints#

EndpointWhat it doesParametersCreditsStatus
bookCLOB order book for an outcome token.token_id*1stable
eventOne prediction event by slug (Gamma).slug*1stable
eventsTop active prediction events by 24h volume (Gamma).limit5stable
last_tradeLast trade price and side for an outcome token.token_id*1stable
marketOne prediction market by slug (Gamma).slug*1stable
marketsTop active prediction markets by 24h volume (Gamma).limit5stable
midpointCLOB midpoint price for an outcome token.token_id*1stable
priceCLOB best buy price for an outcome token.token_id*1stable
price_historyPrice history for an outcome token (interval + fidelity in minutes).token_id*, interval, fidelity5stable
researchResearch a topic across Polymarket: matching prediction-market events with volume, liquidity and dates.query*1stable
searchSearch Polymarket events.q*, limit5stable
server_timePolymarket CLOB server time.-1stable
spreadCLOB bid/ask spread for an outcome token.token_id*1stable
tagsPolymarket topic tags.limit5stable

A * marks a required parameter. Each endpoint name links to its reference page with the full parameter table, caching window and a recorded response.

Make a request#

This calls polymarket.book (1 credit, stable). Replace YOUR_API_KEY with your key; sign up, no card. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.

curl "https://api.onekey.dev/v1/polymarket/book?token_id=39223330966352513418907732239455948906399882924787587183466504819170775983376" \
  -H "x-api-key: YOUR_API_KEY"

Fields you get back#

These unified fields come back from Polymarket, with the same names as on every other platform. The count is how many of its 14 mapped endpoints return the field; a field the source lacks is null, never missing. 14 platform-specific fields (ext.<name>) come on top, documented on each endpoint page.

FieldTypeEndpoints
entity.dateISO 8601 date9
entity.idstring8
entity.namestring7
entity.slugstring7
entity.descriptionstring6
market.liquiditynumber6
market.pricenumber6
market.volumenumber6
media.thumbnailUrlURL6
market.volume24hnumber5
engagement.commentsinteger4
market.openInterestnumber4
market.asknumber3
market.bidnumber3
market.change24hnumber2
entity.categorystring1
event.endDateISO 8601 date1
event.startDateISO 8601 date1

The full schema is in Unified schema.

Pricing#

Polymarket calls cost 1 to 5 credits, flat per endpoint. Free when served from cache (0.2 credit for a cached response over 100 KB). Invalid, failed or not-found calls are not charged. See pricing for credit packs.