Skip to main content

Documentation Index

Fetch the complete documentation index at: https://0x-250ca30e.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The markets endpoints give you access to every active Polymarket market, enriched with probability changes across 1-day, 7-day, and 30-day windows derived from CLOB price history. You can fetch all markets, look up a single market by condition ID, or search by free text. All responses come from a server-side cache with a 2-minute TTL, so you get fast reads without hammering the upstream Gamma API.
All market endpoints are rate limited to 60 requests per minute per IP. Exceeding the limit returns HTTP 429 with a Retry-After: 60 header.

GET /api/markets

Returns a list of all active Polymarket markets, enriched with CLOB price history data for the top markets by volume.

Query parameters

limit
number
default:"500"
Maximum number of markets to return per page. The server fetches up to 2,000 markets from Polymarket and returns them all by default.
offset
number
default:"0"
Number of markets to skip before returning results. Use with limit to paginate through large result sets.

Response fields

Each item in the response array contains:
id
string
required
The Polymarket condition ID for this market (prefixed with 0x).
question
string
required
The full text of the market question, for example "Will the Fed cut rates in June 2025?".
slug
string
URL-safe identifier for the market, for example "fed-rate-cut-june-2025".
currentProbability
number
required
The current YES probability, expressed as a number from 0 to 100.
volume
number
required
Total lifetime trading volume in USD.
liquidity
number
required
Current available liquidity in USD.
oneDayPriceChange
number
Change in YES probability over the past 24 hours, in percentage points. Positive values mean the probability rose. null when price history data is unavailable.
sevenDayPriceChange
number
Change in YES probability over the past 7 days, in percentage points. Only populated for the top 20 markets by volume.
thirtyDayPriceChange
number
Change in YES probability over the past 30 days, in percentage points. Only populated for the top 20 markets by volume.
endDate
string
required
ISO 8601 timestamp for when the market closes, for example "2025-06-30T00:00:00Z".
clobTokenId
string
The CLOB YES token ID for this market. Use this value with the order book endpoints to fetch live bids, asks, and price history.

Caching

The server caches the full market list in memory for 2 minutes. This keeps response times fast without placing unnecessary load on the upstream Polymarket API. Data is at most 2 minutes old.

Example

curl -X GET "/api/markets" \
  -H "Accept: application/json"

Example response

[
  {
    "id": "0x1234abcd...",
    "question": "Will the Fed cut rates in June 2025?",
    "slug": "fed-rate-cut-june-2025",
    "currentProbability": 44,
    "volume": 1250000,
    "liquidity": 85000,
    "oneDayPriceChange": 0.08,
    "sevenDayPriceChange": -0.12,
    "thirtyDayPriceChange": 0.03,
    "endDate": "2025-06-30T00:00:00Z",
    "clobTokenId": "0xabcd1234..."
  }
]

GET /api/markets/search

Returns markets whose question text matches a free-text query. The search is case-insensitive and strips special characters before matching.

Query parameters

q
string
required
The search query. Minimum 2 characters, maximum 200 characters. Special characters (& = ? # %) are stripped before matching. The engine first checks known category keywords (election, crypto, sports, economics, tech) and falls back to a word-level text search.
limit
number
default:"20"
Maximum number of results to return. Capped at 50.

Example

curl -X GET "/api/markets/search?q=bitcoin&limit=10" \
  -H "Accept: application/json"

Example response

[
  {
    "id": "0x5678efgh...",
    "question": "Will Bitcoin close above $100K in 2025?",
    "currentProbability": 62,
    "volume": 3400000,
    "liquidity": 210000,
    "oneDayPriceChange": 2.1,
    "endDate": "2025-12-31T00:00:00Z",
    "clobTokenId": "0xefgh5678..."
  }
]

Error responses

StatusMeaning
429Rate limit exceeded. Retry after 60 seconds.
502Upstream Polymarket Gamma API is unavailable.
500Unexpected server error. Check the error field in the response body.