vike
API EndpointsPolymarket

/market_stats

Aggregate recorded activity for one outcome token in a single row — the cheap orientation call before you request the tape itself.

GET https://data.vike.io/v1/polymarket/market_stats?token_id={token_id}

Aggregate recorded activity for one outcome token in a single row — total events, trade count, trade volume, first and last event timestamps, and how many book snapshots were captured. This is the cheap orientation call: it tells you whether a token has any recorded history, and over what span, before you request the tape itself.

Read the two timestamps before anything else. Here they are 2026-07-25T03:51:50Z and 2026-08-19T23:53:53Z — so this token's recorded tape ends well before "now", and a /events or /orderbook request aimed at the current hour would return nothing for it while a request inside that window returns plenty. That is exactly what this call is for: last_ms is not a promise of freshness, it is the end of what was recorded.

Note also how far apart the counts sit — 202,244 events and 10,674 snapshots against just 302 trades. Event volume is dominated by book activity, not by prints.

cURL
# does this token have a recorded tape, and over what span: the cheap orientation call before any of the heavier ones
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/market_stats?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630"

# the other outcome token of the same market: it is a separate token, so it gets its own tape and its own counts
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/market_stats?token_id=107869950127184141743772429738701578723770582686430100389837827512148691029625"

# a token from a different market, to compare how much tape each one has
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/market_stats?token_id=110439449768613802110790243898351375650535979513820669361590931221457616396762"

# a token that was never recorded is still 200 with ONE row of zeros, not [] and not a 404: test total_events == 0
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/market_stats?token_id=0"

# last_ms is where the recording ends, not now, so keep it and anchor the events window on it
LAST=$(curl -s -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/market_stats?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630" | jq '.[0].last_ms')

# the final hour of that token's tape: TO runs a minute past last_ms because the window filters on local_ts,
# which arrives a few ms after the venue ts that last_ms is built from
FROM=$(( LAST - 3600000 )); TO=$(( LAST + 60000 ))
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&from_ms=$FROM&to_ms=$TO&limit=5"
token_idqueryrequired
The outcome token. Omitting it returns 400 {"error":"market_stats requires token_id"}.
Example response
[
  {
    "first_ms": 1784951510849,
    "last_ms": 1787183633324,
    "snapshots": 10674,
    "total_events": 202244,
    "trade_volume": 39301.396175,
    "trades": 302
  }
]

Returns a one-element array whose row carries total_events, trades, trade_volume, first_ms, last_ms and snapshots. The two timestamps are epoch milliseconds and bound the recorded window — they are the range /events can serve for that token. trade_volume is the summed size of the trade events.

The array always holds exactly one row. A token that was never recorded does not give [] or a 404: it gives one row of zeros (total_events: 0, first_ms: 0, last_ms: 0), so total_events == 0 is the test for "no tape".

cURL
# does this token have a recorded tape, and over what span: the cheap orientation call before any of the heavier onescurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/market_stats?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630"# the other outcome token of the same market: it is a separate token, so it gets its own tape and its own countscurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/market_stats?token_id=107869950127184141743772429738701578723770582686430100389837827512148691029625"# a token from a different market, to compare how much tape each one hascurl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/market_stats?token_id=110439449768613802110790243898351375650535979513820669361590931221457616396762"# a token that was never recorded is still 200 with ONE row of zeros, not [] and not a 404: test total_events == 0curl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/market_stats?token_id=0"# last_ms is where the recording ends, not now, so keep it and anchor the events window on itLAST=$(curl -s -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/market_stats?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630" | jq '.[0].last_ms')# the final hour of that token's tape: TO runs a minute past last_ms because the window filters on local_ts,# which arrives a few ms after the venue ts that last_ms is built fromFROM=$(( LAST - 3600000 )); TO=$(( LAST + 60000 ))curl -H "X-API-Key: $VIKE_API_KEY" \  "https://data.vike.io/v1/polymarket/events?token_id=95532524407959903145510583684979049735028502452973932716346555811355282494630&from_ms=$FROM&to_ms=$TO&limit=5"
Example response
[  {    "first_ms": 1784951510849,    "last_ms": 1787183633324,    "snapshots": 10674,    "total_events": 202244,    "trade_volume": 39301.396175,    "trades": 302  }]