vike
API EndpointsPolymarket

/settlements/bulk

On-chain settlements, many markets per request, oldest resolution first. Walk every settled market in a family (for example every 5-minute BTC market) by following next_cursor, 5,000 markets a page.

GET https://data.vike.io/v1/polymarket/settlements/bulk

The same on-chain settlement row as /settlements/{condition_id}, for many markets in one request. Use it when you need a whole family (every 5-minute BTC market, every market resolved last week) instead of looking markets up one by one: one request returns up to 5,000 rows, so all 80,000 resolved 5-minute BTC markets take 17 requests, not 80,000.

cURL
# the first page of settled 5-minute BTC markets, oldest first
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/settlements/bulk?slug_prefix=btc-updown-5m-&limit=5000"

# one day, by resolution time (from_ms inclusive, to_ms exclusive)
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/settlements/bulk?from_ms=1788000000000&to_ms=1788086400000&slug_prefix=btc-updown-5m-&limit=5000"

# walk to the end: pass next_cursor back verbatim until has_more is false
CUR=""
while :; do
  PAGE=$(curl -s -H "X-API-Key: $VIKE_API_KEY" \
    "https://data.vike.io/v1/polymarket/settlements/bulk?slug_prefix=btc-updown-5m-&limit=5000&cursor=$CUR")
  echo "$PAGE" | jq -c '.settlements[]'
  [ "$(echo "$PAGE" | jq -r .has_more)" = "true" ] || break
  CUR=$(echo "$PAGE" | jq -r .next_cursor)
done
from_msqueryoptional
Resolution time, epoch ms, inclusive. Default: from the first resolution.
to_msqueryoptional
Resolution time, epoch ms, exclusive. Must be greater than from_ms. Default: no upper bound.
slug_prefixqueryoptional
Only markets whose slug starts with this, e.g. btc-updown-5m-. Lowercase letters, digits and -, up to 100 characters; anything else is a 400. A market with no known slug never matches.
cursorqueryoptional
Resume strictly after this resolved_ts_ms:condition_id, taken from a previous page's next_cursor.
limitqueryoptional
Rows per page. Default and hard cap 5000. A page takes a few seconds whatever its size, so ask for full pages.

A real page (two rows of limit=2), read with the query this route runs.

Example response
{
  "settlements": [
    {
      "condition_id": "0xe04b14c2c4f69d768025480ee1a0d589647886fc0aede00072b460717325d0e1",
      "market_known": true,
      "outcomes": ["Up", "Down"],
      "payouts": [1, 0],
      "question": "Bitcoin Up or Down - August 29, 6:35AM-6:40AM ET",
      "resolved_block": 92863350,
      "resolved_ts_ms": 1788000052000,
      "slug": "btc-updown-5m-1787999700",
      "token_ids": ["104378479770030419727068710579767437090014907106118741919268157422278025763168", "15617719982394306590383243669366381401176645956252443395783168354316833091069"],
      "winning_index": 0,
      "winning_outcome": "Up",
      "winning_token_id": "104378479770030419727068710579767437090014907106118741919268157422278025763168"
    },
    {
      "condition_id": "0x9cc5943d4cd79ec25cf27e61fa8defb8516679229dac94df1e9e8aa6a5665722",
      "market_known": true,
      "outcomes": ["Up", "Down"],
      "payouts": [0, 1],
      "question": "Bitcoin Up or Down - August 29, 6:40AM-6:45AM ET",
      "resolved_block": 92863573,
      "resolved_ts_ms": 1788000387000,
      "slug": "btc-updown-5m-1788000000",
      "token_ids": ["69775161768066740409509586315403873949324245230842988812428273566185345905522", "16706190288354983504282222157988012729073956408488269893956724915652064660554"],
      "winning_index": 1,
      "winning_outcome": "Down",
      "winning_token_id": "16706190288354983504282222157988012729073956408488269893956724915652064660554"
    }
  ],
  "has_more": true,
  "next_cursor": "1788000387000:0x9cc5943d4cd79ec25cf27e61fa8defb8516679229dac94df1e9e8aa6a5665722"
}

Rows are ordered by (resolved_ts_ms, condition_id) and each one is field for field what the single-market route returns, market_known, outcomes, question and winning_outcome included (what they mean, and what an unknown market looks like, is on /settlements/{condition_id}). next_cursor is a string only while has_more is true, and null on the last page.

  • Every page costs one request, like any other call, against the rate limits.
  • A market the chain never resolved is not listed (cancelled or voided markets, and markets still trading). An empty settlements array with has_more: false means nothing matched.
  • slug_prefix matches the market's slug. A market with no known slug (always so when market_known is false) never matches a prefix; leave slug_prefix out to list every settlement.
  • A bad slug_prefix or cursor, or to_ms not after from_ms, is a 400 with {"error": "…"}.

There is still no bare /settlements

/v1/polymarket/settlements without bulk or a condition id answers 404.

cURL
# the first page of settled 5-minute BTC markets, oldest firstcurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/settlements/bulk?slug_prefix=btc-updown-5m-&limit=5000"# one day, by resolution time (from_ms inclusive, to_ms exclusive)curl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/settlements/bulk?from_ms=1788000000000&to_ms=1788086400000&slug_prefix=btc-updown-5m-&limit=5000"# walk to the end: pass next_cursor back verbatim until has_more is falseCUR=""while :; do  PAGE=$(curl -s -H "X-API-Key: $VIKE_API_KEY" \    "https://data.vike.io/v1/polymarket/settlements/bulk?slug_prefix=btc-updown-5m-&limit=5000&cursor=$CUR")  echo "$PAGE" | jq -c '.settlements[]'  [ "$(echo "$PAGE" | jq -r .has_more)" = "true" ] || break  CUR=$(echo "$PAGE" | jq -r .next_cursor)done
Example response
{  "settlements": [    {      "condition_id": "0xe04b14c2c4f69d768025480ee1a0d589647886fc0aede00072b460717325d0e1",      "market_known": true,      "outcomes": ["Up", "Down"],      "payouts": [1, 0],      "question": "Bitcoin Up or Down - August 29, 6:35AM-6:40AM ET",      "resolved_block": 92863350,      "resolved_ts_ms": 1788000052000,      "slug": "btc-updown-5m-1787999700",      "token_ids": ["104378479770030419727068710579767437090014907106118741919268157422278025763168", "15617719982394306590383243669366381401176645956252443395783168354316833091069"],      "winning_index": 0,      "winning_outcome": "Up",      "winning_token_id": "104378479770030419727068710579767437090014907106118741919268157422278025763168"    },    {      "condition_id": "0x9cc5943d4cd79ec25cf27e61fa8defb8516679229dac94df1e9e8aa6a5665722",      "market_known": true,      "outcomes": ["Up", "Down"],      "payouts": [0, 1],      "question": "Bitcoin Up or Down - August 29, 6:40AM-6:45AM ET",      "resolved_block": 92863573,      "resolved_ts_ms": 1788000387000,      "slug": "btc-updown-5m-1788000000",      "token_ids": ["69775161768066740409509586315403873949324245230842988812428273566185345905522", "16706190288354983504282222157988012729073956408488269893956724915652064660554"],      "winning_index": 1,      "winning_outcome": "Down",      "winning_token_id": "16706190288354983504282222157988012729073956408488269893956724915652064660554"    }  ],  "has_more": true,  "next_cursor": "1788000387000:0x9cc5943d4cd79ec25cf27e61fa8defb8516679229dac94df1e9e8aa6a5665722"}