vike
API EndpointsPolymarket

/markets

The market directory — search and filter the recorded market universe by slug. The entry point: almost every other Polymarket endpoint needs an id that only this one hands out.

GET https://data.vike.io/v1/polymarket/markets

The market directory — search and filter the recorded market universe by slug. Returns a bare JSON array ordered by end_date descending, each row carrying condition_id, slug, token_ids, tick_size, neg_risk, active, closed and end_date. This is the entry point: almost every other endpoint here needs an id that only this one hands out.

All three rows are shown — limit=3 bounded the response. The token_ids in the first row are what every query-parameter endpoint in this namespace takes; the condition_id is what the two path-parameter endpoints take. end_date is epoch milliseconds (1798779600000 is 2027-01-01T05:00:00Z, i.e. the end of 2026 in US Eastern time).

The third slug is not a transcription error: some slugs carry a long numeric tail, and a client that assumes a short human-readable slug will be surprised by one.

cURL
# find a market by name: every row carries the condition_id and the two token_ids the other endpoints take
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/markets?query=bitcoin&limit=3"

# only markets still trading: derived from on-chain resolutions plus the venue's own closed flag, so it is the slow path
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/markets?query=bitcoin&active=true&limit=20"

# only settled ones, for a resolved-outcome dataset: closed is the complement of active, so pass one of the two, never both
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/markets?query=bitcoin&closed=true&limit=20"

# a whole family of short-dated markets by its slug stem; end_date descending puts the latest-ending first
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/markets?query=btc-updown-5m&limit=100"

# there is no offset or cursor and 100 is the cap, so to reach further narrow the slug instead of paging
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/markets?query=will-bitcoin-reach&limit=100"

# keep the first row's two token_ids: the keys to /ohlcv, /orderbook, /market_stats and /events
curl -s -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/markets?query=bitcoin&limit=1" | jq '.[0].token_ids'
queryqueryoptional
Case-insensitive substring match on the market slug.
activequeryoptional
true = only active, false = only inactive, omit = all.
closedqueryoptional
The complement of active: true (or 1) = only closed.
limitqueryoptional
Max rows. Default 50, hard cap 100 — a larger value is silently clamped, not rejected.
Example response
[
  {
    "active": 1,
    "closed": 0,
    "condition_id": "0x7b9072e6a9cdcf022c4f098564e8ee612d544e179e4a33dcc2790fbaa778daa8",
    "end_date": 1798779600000,
    "neg_risk": 1,
    "slug": "will-bitcoin-reach-70000-by-december-31-2026-from-june-8",
    "tick_size": 0.001,
    "token_ids": [
      "95532524407959903145510583684979049735028502452973932716346555811355282494630",
      "107869950127184141743772429738701578723770582686430100389837827512148691029625"
    ]
  },
  {
    "active": 1,
    "closed": 0,
    "condition_id": "0x84fdc3f917e34acca874f93d978e84ed0c08969903ddf40a5d65274b3a5b4fdf",
    "end_date": 1798779600000,
    "neg_risk": 1,
    "slug": "will-bitcoin-reach-75000-by-december-31-2026-from-june-8",
    "tick_size": 0.001,
    "token_ids": [
      "110439449768613802110790243898351375650535979513820669361590931221457616396762",
      "71940078455524699585822697954608343130226662273950516751010200431921477907081"
    ]
  },
  {
    "active": 1,
    "closed": 0,
    "condition_id": "0x752fa61c93f16c4b15e85b0bd438d9c684176b0ea7b319a84c8aca34616e8a8c",
    "end_date": 1798779600000,
    "neg_risk": 1,
    "slug": "will-bitcoin-dip-to-55000-by-december-31-2026-527-627-868-745-188-361-314-673-612-946-821-624-855-557-684-381-884-939-182-939-516",
    "tick_size": 0.01,
    "token_ids": [
      "115462087336983275104521488923966022755348986822352694745153736621832003960847",
      "48849252416222520684793262794712201381742900852794310345084361317209768152557"
    ]
  }
]

active and closed are derived, not stored: a market counts as closed when it has an on-chain resolution or the venue's own listing says so, and active is simply the opposite. A settled market therefore reports closed: 1, whatever the venue's own "listed" flag still says. The list is ordered by end_date descending with no tiebreaker, so the order among markets that end at the same instant is arbitrary and can change between calls.

cURL
# find a market by name: every row carries the condition_id and the two token_ids the other endpoints takecurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/markets?query=bitcoin&limit=3"# only markets still trading: derived from on-chain resolutions plus the venue's own closed flag, so it is the slow pathcurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/markets?query=bitcoin&active=true&limit=20"# only settled ones, for a resolved-outcome dataset: closed is the complement of active, so pass one of the two, never bothcurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/markets?query=bitcoin&closed=true&limit=20"# a whole family of short-dated markets by its slug stem; end_date descending puts the latest-ending firstcurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/markets?query=btc-updown-5m&limit=100"# there is no offset or cursor and 100 is the cap, so to reach further narrow the slug instead of pagingcurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/markets?query=will-bitcoin-reach&limit=100"# keep the first row's two token_ids: the keys to /ohlcv, /orderbook, /market_stats and /eventscurl -s -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/markets?query=bitcoin&limit=1" | jq '.[0].token_ids'
Example response
[  {    "active": 1,    "closed": 0,    "condition_id": "0x7b9072e6a9cdcf022c4f098564e8ee612d544e179e4a33dcc2790fbaa778daa8",    "end_date": 1798779600000,    "neg_risk": 1,    "slug": "will-bitcoin-reach-70000-by-december-31-2026-from-june-8",    "tick_size": 0.001,    "token_ids": [      "95532524407959903145510583684979049735028502452973932716346555811355282494630",      "107869950127184141743772429738701578723770582686430100389837827512148691029625"    ]  },  {    "active": 1,    "closed": 0,    "condition_id": "0x84fdc3f917e34acca874f93d978e84ed0c08969903ddf40a5d65274b3a5b4fdf",    "end_date": 1798779600000,    "neg_risk": 1,    "slug": "will-bitcoin-reach-75000-by-december-31-2026-from-june-8",    "tick_size": 0.001,    "token_ids": [      "110439449768613802110790243898351375650535979513820669361590931221457616396762",      "71940078455524699585822697954608343130226662273950516751010200431921477907081"    ]  },  {    "active": 1,    "closed": 0,    "condition_id": "0x752fa61c93f16c4b15e85b0bd438d9c684176b0ea7b319a84c8aca34616e8a8c",    "end_date": 1798779600000,    "neg_risk": 1,    "slug": "will-bitcoin-dip-to-55000-by-december-31-2026-527-627-868-745-188-361-314-673-612-946-821-624-855-557-684-381-884-939-182-939-516",    "tick_size": 0.01,    "token_ids": [      "115462087336983275104521488923966022755348986822352694745153736621832003960847",      "48849252416222520684793262794712201381742900852794310345084361317209768152557"    ]  }]