vike
API EndpointsPolymarket

/events

The raw per-market event tape — book snapshots and deltas, trade prints, tick-size changes and status markers. The finest grain the API offers, capped at a 24-hour window and the only endpoint here that pages by cursor.

GET https://data.vike.io/v1/polymarket/events?token_id={token_id}&from_ms={from}&to_ms={to}

The raw per-market event tape: book snapshots and deltas, trade prints, tick-size changes and stream-health status markers, ordered by (local_ts, seq, token_id). This is the finest grain the API offers, for one token or a family of up to 100 over a bounded window.

Truncated for the page: limit=3 returned three events; the first two are shown, and next_cursor above is the real one from that three-event page (it names the third event's local_ts:seq:token_id). has_more is true because the window holds more rows than the page did — with a limit this small that is almost immediate, and it says nothing about how big the window is.

The window was chosen from /market_stats, which is the intended order of operations: to_ms here is that token's last_ms exactly, and from_ms is roughly an hour earlier. Asking for a window at the current wall clock would have returned an empty page for this token. The window is cut on local_ts — the recorder's receive time, a few milliseconds after the venue's own ts that every row also carries (the first row here: ts …368, local_ts …379).

Event rows follow the event model: bids and asks hold JSON text, and a numeric field the event type does not populate is 0, not null. See Polymarket data model.

cURL
# the raw tape of one token over a window inside its recording (market_stats gave the bounds): three events, oldest local_ts first
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&from_ms=1787180000000&to_ms=1787183633324&limit=3"

# the next page of that same window: the same parameters plus the previous response's next_cursor; keep going while has_more is true
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&from_ms=1787180000000&to_ms=1787183633324&limit=3&cursor=1787180122865:8406:95532524407959903145510583684979049735028502452973932716346555811355282494630"

# every executed trade of the final 24 hours of the tape, skipping the book churn; a window may be exactly 24 h wide and no wider
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&event_type=trade&from_ms=1787097233324&to_ms=1787183633324&limit=500"

# the same trade filter on the day before, for a backtest: windows are half-open, so [a, b) then [b, c) never counts the boundary tick twice
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&event_type=trade&from_ms=1787010833324&to_ms=1787097233324&limit=500"

# the book events only (snapshots are among them, not all of them): bids and asks come back as JSON text you parse a second time
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&event_type=book&from_ms=1787180000000&to_ms=1787183633324&limit=5"

# both outcome tokens of the market in one tape, ordered by local_ts, seq, token_id; token_ids takes up to 100 and wins over token_id
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/events?token_ids=95532524407959903145510583684979049735028502452973932716346555811355282494630,107869950127184141743772429738701578723770582686430100389837827512148691029625&event_type=trade&from_ms=1787097233324&to_ms=1787183633324&limit=500"
token_idqueryoptional
A single token — sugar for a one-element token_ids.
token_idsqueryoptional
Comma-separated token ids, max 100 per request. Wins over token_id if both are given.
from_msqueryrequired
Window start, epoch ms, inclusive.
to_msqueryrequired
Window end, epoch ms, exclusive. Must be greater than from_ms.
event_typequeryoptional
Filter to one of book, price_change, trade, tick_size_change, status.
cursorqueryoptional
Resume strictly after this local_ts:seq:token_id triple, taken from a previous page's next_cursor.
limitqueryoptional
Max rows per page. Default 5000, hard cap 50000.
Example response
{
  "events": [
    {
      "asks": "",
      "best_ask": 0,
      "best_bid": 0,
      "bids": "[[0.782,0.0]]",
      "event_type": "price_change",
      "is_snapshot": 0,
      "local_ts": 1787180056379,
      "price": 0.782,
      "seq": 8404,
      "side": "buy",
      "size": 0,
      "status": "",
      "token_id": "95532524407959903145510583684979049735028502452973932716346555811355282494630",
      "ts": 1787180056368
    },
    {
      "asks": "",
      "best_ask": 0,
      "best_bid": 0,
      "bids": "[[0.782,6.25]]",
      "event_type": "price_change",
      "is_snapshot": 0,
      "local_ts": 1787180056894,
      "price": 0.782,
      "seq": 8405,
      "side": "buy",
      "size": 6.25,
      "status": "",
      "token_id": "95532524407959903145510583684979049735028502452973932716346555811355282494630",
      "ts": 1787180056883
    }
  ],
  "has_more": true,
  "next_cursor": "1787180122865:8406:95532524407959903145510583684979049735028502452973932716346555811355282494630"
}

Two things unique to this endpoint

The window is capped at 24 hours. A wider request is refused outright: {"error":"get_events window too wide: 800000000000ms requested, max 86400000ms (24h)"}. Page across days by moving the window, not by widening it. A request for more than 100 tokens is refused the same way, naming the count.

It is the only endpoint here that pages by cursor. The market-data routes (/markets, /ohlcv, /orderbook) return a bare array with no way to continue; this one returns an object — {"events": [...], "next_cursor": "...", "has_more": true}. Follow has_more and feed next_cursor back as cursor. On the last page has_more is false and next_cursor is null — present, never omitted — so a page shorter than limit is the end of the window, and the loop ends on has_more, not on a count.

If you want a whole day, or many days, of this tape, do not page it here — the same events are published as Parquet in the bulk archive, which is a single download instead of tens of thousands of pages.

cURL
# the raw tape of one token over a window inside its recording (market_stats gave the bounds): three events, oldest local_ts firstcurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&from_ms=1787180000000&to_ms=1787183633324&limit=3"# the next page of that same window: the same parameters plus the previous response's next_cursor; keep going while has_more is truecurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&from_ms=1787180000000&to_ms=1787183633324&limit=3&cursor=1787180122865:8406:95532524407959903145510583684979049735028502452973932716346555811355282494630"# every executed trade of the final 24 hours of the tape, skipping the book churn; a window may be exactly 24 h wide and no widercurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&event_type=trade&from_ms=1787097233324&to_ms=1787183633324&limit=500"# the same trade filter on the day before, for a backtest: windows are half-open, so [a, b) then [b, c) never counts the boundary tick twicecurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&event_type=trade&from_ms=1787010833324&to_ms=1787097233324&limit=500"# the book events only (snapshots are among them, not all of them): bids and asks come back as JSON text you parse a second timecurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&event_type=book&from_ms=1787180000000&to_ms=1787183633324&limit=5"# both outcome tokens of the market in one tape, ordered by local_ts, seq, token_id; token_ids takes up to 100 and wins over token_idcurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/events?token_ids=95532524407959903145510583684979049735028502452973932716346555811355282494630,107869950127184141743772429738701578723770582686430100389837827512148691029625&event_type=trade&from_ms=1787097233324&to_ms=1787183633324&limit=500"
Example response
{  "events": [    {      "asks": "",      "best_ask": 0,      "best_bid": 0,      "bids": "[[0.782,0.0]]",      "event_type": "price_change",      "is_snapshot": 0,      "local_ts": 1787180056379,      "price": 0.782,      "seq": 8404,      "side": "buy",      "size": 0,      "status": "",      "token_id": "95532524407959903145510583684979049735028502452973932716346555811355282494630",      "ts": 1787180056368    },    {      "asks": "",      "best_ask": 0,      "best_bid": 0,      "bids": "[[0.782,6.25]]",      "event_type": "price_change",      "is_snapshot": 0,      "local_ts": 1787180056894,      "price": 0.782,      "seq": 8405,      "side": "buy",      "size": 6.25,      "status": "",      "token_id": "95532524407959903145510583684979049735028502452973932716346555811355282494630",      "ts": 1787180056883    }  ],  "has_more": true,  "next_cursor": "1787180122865:8406:95532524407959903145510583684979049735028502452973932716346555811355282494630"}