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#
| Endpoint | What it does | Parameters | Credits | Status |
|---|---|---|---|---|
book | CLOB order book for an outcome token. | token_id* | 1 | stable |
event | One prediction event by slug (Gamma). | slug* | 1 | stable |
events | Top active prediction events by 24h volume (Gamma). | limit | 5 | stable |
last_trade | Last trade price and side for an outcome token. | token_id* | 1 | stable |
market | One prediction market by slug (Gamma). | slug* | 1 | stable |
markets | Top active prediction markets by 24h volume (Gamma). | limit | 5 | stable |
midpoint | CLOB midpoint price for an outcome token. | token_id* | 1 | stable |
price | CLOB best buy price for an outcome token. | token_id* | 1 | stable |
price_history | Price history for an outcome token (interval + fidelity in minutes). | token_id*, interval, fidelity | 5 | stable |
research | Research a topic across Polymarket: matching prediction-market events with volume, liquidity and dates. | query* | 1 | stable |
search | Search Polymarket events. | q*, limit | 5 | stable |
server_time | Polymarket CLOB server time. | - | 1 | stable |
spread | CLOB bid/ask spread for an outcome token. | token_id* | 1 | stable |
tags | Polymarket topic tags. | limit | 5 | stable |
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.
| Field | Type | Endpoints |
|---|---|---|
entity.date | ISO 8601 date | 9 |
entity.id | string | 8 |
entity.name | string | 7 |
entity.slug | string | 7 |
entity.description | string | 6 |
market.liquidity | number | 6 |
market.price | number | 6 |
market.volume | number | 6 |
media.thumbnailUrl | URL | 6 |
market.volume24h | number | 5 |
engagement.comments | integer | 4 |
market.openInterest | number | 4 |
market.ask | number | 3 |
market.bid | number | 3 |
market.change24h | number | 2 |
entity.category | string | 1 |
event.endDate | ISO 8601 date | 1 |
event.startDate | ISO 8601 date | 1 |
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.