vike

Recipe 22 of 30

Compare the order book of Polymarket's 5-minute and 15-minute crypto Up/Down markets, coin by coin

List one day's per-coin top-of-book files with /archive/datasets, download them, and compute spread, size at the touch and quote updates per market for each coin in DuckDB.

The archive splits the crypto Up/Down markets into one file per coin (asset), window length (tenor) and UTC day. GET /v1/polymarket/archive/datasets with tenor and a date lists every coin's file with its size in one call; the l1_quotes stream is each token's best bid and ask with sizes, one row per change. Download the coins you want and let DuckDB group by the file name. The full parameter list is on Archive file index.

Quick answer

List one day's 5-minute top-of-book files, every coin.

cURL
# every coin's 5-minute top-of-book file for one day, with sizes
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/archive/datasets?tenor=5m&stream=l1_quotes&from=2026-10-23&to=2026-10-23"

Example response

Captured from the live API on 2026-10-24 at 17:22 UTC, trimmed to 3 of 7 rows. The seven coins that day were btc, eth, sol, xrp, doge, bnb and hype. Row counts already rank them by activity: btc had 19.3 million quote changes, eth 5.6 million, hype 0.6 million.

Example response
{
  "datasets": [
    {
      "asset": "xrp",
      "bytes": 22755046,
      "date": "2026-10-23",
      "layout": "family",
      "rows": 2480092,
      "stream": "l1_quotes",
      "tenor": "5m",
      "url": "https://data.vike.io/archive/venue=polymarket/asset=xrp/tenor=5m/date=2026-10-23/l1_quotes.parquet",
      "venue": "polymarket"
    },
    {
      "asset": "sol",
      "bytes": 32124535,
      "date": "2026-10-23",
      "layout": "family",
      "rows": 3376309,
      "stream": "l1_quotes",
      "tenor": "5m",
      "url": "https://data.vike.io/archive/venue=polymarket/asset=sol/tenor=5m/date=2026-10-23/l1_quotes.parquet",
      "venue": "polymarket"
    },
    {
      "asset": "hype",
      "bytes": 3785536,
      "date": "2026-10-23",
      "layout": "family",
      "rows": 603993,
      "stream": "l1_quotes",
      "tenor": "5m",
      "url": "https://data.vike.io/archive/venue=polymarket/asset=hype/tenor=5m/date=2026-10-23/l1_quotes.parquet",
      "venue": "polymarket"
    }
  ],
  "limit": 200,
  "offset": 0,
  "total": 7
}

Variations

Download one coin. Name the file after the coin; the DuckDB query reads the coin back from the file name.

cURL — download eth
# the day's 5-minute ETH quotes, saved locally
curl -s -L -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/archive/url?date=2026-10-23&stream=l1_quotes&asset=eth&tenor=5m&redirect=true" \
  -o eth-5m-l1_quotes-2026-10-23.parquet

Compare the coins in DuckDB.

DuckDB
SELECT split_part(parse_filename(filename), '-', 1) AS coin,
       count(DISTINCT condition_id) AS markets,
       count(*) // count(DISTINCT condition_id) AS updates_per_market,
       median(CAST(ask - bid AS DOUBLE)) AS median_spread,
       median(CAST(bid_size + ask_size AS DOUBLE)) AS median_touch_shares
FROM read_parquet('*-5m-l1_quotes-2026-10-23.parquet', filename = true)
WHERE bid > 0 AND ask > 0 AND ask >= bid
GROUP BY coin ORDER BY markets DESC;

The 15-minute markets. The same listing with tenor=15m; the archive also has 4h.

cURL — 15 minutes
# every coin's 15-minute top-of-book file for the same day
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/archive/datasets?tenor=15m&stream=l1_quotes&from=2026-10-23&to=2026-10-23"

Who won, per coin. Slugs follow <coin>-updown-<tenor>-<start in unix seconds>, so a prefix selects one coin and tenor.

cURL — outcomes
# the 15-minute ETH markets settled on 2026-10-23
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/polymarket/settlements/bulk?slug_prefix=eth-updown-15m-&from_ms=1792713600000&to_ms=1792800000000&limit=5000"

Before you rely on it

Per quote change, not per second

Each row is one change at the top of the book, so a median over rows weights busy moments and ignores quiet ones; for a time-weighted spread, weight each quote by the time until the next one. A file holds one UTC day, so a market that spans midnight is split across two files. The per-coin layout does not cover every date the all-markets layout does: pick dates from the listing rather than assuming them.

Ask your agent

Connected to the Vike MCP server (https://vike.io/mcp) in Claude, ChatGPT or Cursor, ask it in plain words. The polymarket_archive tool answers, at 1 credit a call.

Ask your agent
List the Polymarket archive files of the 5-minute crypto Up/Down markets for 2026-10-23, per coin, with their sizes
Example response
{  "datasets": [    {      "asset": "xrp",      "bytes": 22755046,      "date": "2026-10-23",      "layout": "family",      "rows": 2480092,      "stream": "l1_quotes",      "tenor": "5m",      "url": "https://data.vike.io/archive/venue=polymarket/asset=xrp/tenor=5m/date=2026-10-23/l1_quotes.parquet",      "venue": "polymarket"    },    {      "asset": "sol",      "bytes": 32124535,      "date": "2026-10-23",      "layout": "family",      "rows": 3376309,      "stream": "l1_quotes",      "tenor": "5m",      "url": "https://data.vike.io/archive/venue=polymarket/asset=sol/tenor=5m/date=2026-10-23/l1_quotes.parquet",      "venue": "polymarket"    },    {      "asset": "hype",      "bytes": 3785536,      "date": "2026-10-23",      "layout": "family",      "rows": 603993,      "stream": "l1_quotes",      "tenor": "5m",      "url": "https://data.vike.io/archive/venue=polymarket/asset=hype/tenor=5m/date=2026-10-23/l1_quotes.parquet",      "venue": "polymarket"    }  ],  "limit": 200,  "offset": 0,  "total": 7}