vike

Recipe 6 of 65

Where was BTC open interest sitting an hour before a liquidation cascade?

Read the BTC positions of the hour before the move from /positions with start, end and resolution=1h, page through all of them, then group them by side and by liquidation price yourself.

GET /v1/hyperliquid/positions answers it, page by page, with start, end and resolution=1h set to the hour before the cascade. Each row is one open BTC position as it stood in that hour, with its size, entry, leverage and liquidation price. Page through every row and aggregate on your side: by direction for the long and short split, by liquidation_price for a heatmap as of that hour. The full parameter list is on Positions.

Quick answer

Pick the cascade hour, then ask for the hour before it.

cURL
# open BTC positions in the hour before the 2026-10-22 01:00 UTC move
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hyperliquid/positions?symbol=BTC&start=2026-10-22T00:00:00Z&end=2026-10-22T00:59:59Z&resolution=1h&limit=5"

Example response

Captured from the live API on 2026-10-24 at 17:15 UTC, trimmed to 3 of the 5 rows. label_computed is cut to its first keys and the legacy asset copy of symbol is left out. The hour is the largest BTC hourly move of the three days before the capture (84,156 to 83,370, down 0.93%).

The first rows are tiny positions because pages come in wallet-address order, not by size. size_usd is notional in USD at that snapshot, and the cohort labels are the ones each wallet had in that hour (pnl_cohort_basis is point_in_time).

Example response
{
  "positions": [
    {
      "wallet": "0x0004fad78ea83e0b68e8c1f426061361c2d9b75d",
      "symbol": "BTC",
      "direction": "long",
      "size_token": 0.0086,
      "size_usd": 724.10624,
      "entry_price": 84617.0,
      "mark_price": 84198.4,
      "liquidation_price": 0.0,
      "unrealized_pnl": -3.59996000000005,
      "leverage": 10.0,
      "leverage_type": "cross",
      "margin_used": 72.410624,
      "size_cohort": "shrimp",
      "liq_progress": 0.0,
      "dex_name": "HL",
      "snapshot_ts": "2026-10-22T00:03:00+00:00",
      "pnl_cohort": "winner",
      "pnl_abs_cohort": "$0-$10k",
      "pnl_cohort_as_of": "2026-10-22T00:00:00+00:00",
      "pnl_cohort_basis": "point_in_time",
      "opened_at": "2026-09-23T05:09:00+00:00"
    },
    {
      "wallet": "0x0204ffefe9a2ae697ee0d974e1a9a24fd166971b",
      "symbol": "BTC",
      "direction": "short",
      "size_token": 0.00919,
      "size_usd": 773.783296,
      "entry_price": 84308.0,
      "mark_price": 84198.4,
      "liquidation_price": 86412.96,
      "unrealized_pnl": 1.0072240000000534,
      "leverage": 40.0,
      "leverage_type": "isolated",
      "margin_used": 19.3445824,
      "size_cohort": "shrimp",
      "liq_progress": 0.0,
      "dex_name": "HL",
      "snapshot_ts": "2026-10-22T00:03:00+00:00",
      "pnl_cohort": "2x loser",
      "pnl_abs_cohort": "-$10k-$0",
      "pnl_cohort_as_of": "2026-10-22T00:00:00+00:00",
      "pnl_cohort_basis": "point_in_time",
      "opened_at": "2026-10-21T07:44:00+00:00"
    },
    {
      "wallet": "0x037a4c0b20c9d205765d9c87729c79b44c8aa640",
      "symbol": "BTC",
      "direction": "long",
      "size_token": 0.00012,
      "size_usd": 10.103807999999999,
      "entry_price": 84499.0,
      "mark_price": 84198.4,
      "liquidation_price": 56432.86666666667,
      "unrealized_pnl": -0.0360720000000007,
      "leverage": 3.0,
      "leverage_type": "isolated",
      "margin_used": 3.367936,
      "size_cohort": "shrimp",
      "liq_progress": 0.010710417300091422,
      "dex_name": "HL",
      "snapshot_ts": "2026-10-22T00:03:00+00:00",
      "pnl_cohort": "loser",
      "pnl_abs_cohort": "-$10k-$0",
      "pnl_cohort_as_of": "2026-10-22T00:00:00+00:00",
      "pnl_cohort_basis": "point_in_time",
      "opened_at": "2026-10-06T11:48:00+00:00"
    }
  ],
  "nextCursor": "eyJhIjoiQlRDIiwiZCI6MSwibSI6Imhpc3QxaCIsInQiOiIyMDI2LTEwLTIyIDAwOjAzOjAwIiwidyI6IjB4MDM3YTRjMGIyMGM5ZDIwNTc2NWQ5Yzg3NzI5Yzc5YjQ0YzhhYTY0MCJ9",
  "label_computed": {
    "grading": "realized",
    "lookahead": false,
    "resolution": "hourly"
  }
}

Variations

Long and short notional of the hour. Read a 5000-row page and total it by side. Repeat with cursor until nextCursor is null, then add the pages up.

cURL — totals by side
# long and short BTC notional in the hour before the move, one page
curl -s -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hyperliquid/positions?symbol=BTC&start=2026-10-22T00:00:00Z&end=2026-10-22T00:59:59Z&resolution=1h&limit=5000" \
  | jq '{more: (.nextCursor != null), by_side: (.positions | group_by(.direction) | map({direction: .[0].direction, positions: length, usd: (map(.size_usd) | add)}))}'

A heatmap as of that hour. Bin the page by liquidation price in $1,000 steps, leaving out positions with no liquidation price.

cURL — liquidation-price bins
# BTC notional by $1,000 liquidation-price bin, the hour before the move
curl -s -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hyperliquid/positions?symbol=BTC&start=2026-10-22T00:00:00Z&end=2026-10-22T00:59:59Z&resolution=1h&limit=5000" \
  | jq '[.positions[] | select(.liquidation_price > 0)] | group_by((.liquidation_price / 1000 | floor)) | map({bin: (.[0].liquidation_price / 1000 | floor * 1000), usd: (map(.size_usd) | add)}) | sort_by(-.usd) | .[:10]'

What was liquidated in the move. The forced closes inside the cascade hour itself.

cURL — liquidations in the hour
# BTC liquidations between 01:00 and 02:00 UTC
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hyperliquid/liquidations?symbol=BTC&start=2026-10-22T01:00:00Z&end=2026-10-22T02:00:00Z&limit=5000"

Before you rely on it

Key order, every page, and one hour per position

Historical pages are ordered by symbol, snapshot time and wallet, never by size, so the first page is not the biggest positions: read every page before you total or sort. With resolution=1h each position appears once in the hour, but rows inside one hour can carry different snapshot_ts values. Position history starts 2026-05-01; an earlier start is a 400.

Ask your agent

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

Ask your agent
How were BTC longs and shorts positioned on Hyperliquid in the hour before 2026-10-22 01:00 UTC?
Example response
{  "positions": [    {      "wallet": "0x0004fad78ea83e0b68e8c1f426061361c2d9b75d",      "symbol": "BTC",      "direction": "long",      "size_token": 0.0086,      "size_usd": 724.10624,      "entry_price": 84617.0,      "mark_price": 84198.4,      "liquidation_price": 0.0,      "unrealized_pnl": -3.59996000000005,      "leverage": 10.0,      "leverage_type": "cross",      "margin_used": 72.410624,      "size_cohort": "shrimp",      "liq_progress": 0.0,      "dex_name": "HL",      "snapshot_ts": "2026-10-22T00:03:00+00:00",      "pnl_cohort": "winner",      "pnl_abs_cohort": "$0-$10k",      "pnl_cohort_as_of": "2026-10-22T00:00:00+00:00",      "pnl_cohort_basis": "point_in_time",      "opened_at": "2026-09-23T05:09:00+00:00"    },    {      "wallet": "0x0204ffefe9a2ae697ee0d974e1a9a24fd166971b",      "symbol": "BTC",      "direction": "short",      "size_token": 0.00919,      "size_usd": 773.783296,      "entry_price": 84308.0,      "mark_price": 84198.4,      "liquidation_price": 86412.96,      "unrealized_pnl": 1.0072240000000534,      "leverage": 40.0,      "leverage_type": "isolated",      "margin_used": 19.3445824,      "size_cohort": "shrimp",      "liq_progress": 0.0,      "dex_name": "HL",      "snapshot_ts": "2026-10-22T00:03:00+00:00",      "pnl_cohort": "2x loser",      "pnl_abs_cohort": "-$10k-$0",      "pnl_cohort_as_of": "2026-10-22T00:00:00+00:00",      "pnl_cohort_basis": "point_in_time",      "opened_at": "2026-10-21T07:44:00+00:00"    },    {      "wallet": "0x037a4c0b20c9d205765d9c87729c79b44c8aa640",      "symbol": "BTC",      "direction": "long",      "size_token": 0.00012,      "size_usd": 10.103807999999999,      "entry_price": 84499.0,      "mark_price": 84198.4,      "liquidation_price": 56432.86666666667,      "unrealized_pnl": -0.0360720000000007,      "leverage": 3.0,      "leverage_type": "isolated",      "margin_used": 3.367936,      "size_cohort": "shrimp",      "liq_progress": 0.010710417300091422,      "dex_name": "HL",      "snapshot_ts": "2026-10-22T00:03:00+00:00",      "pnl_cohort": "loser",      "pnl_abs_cohort": "-$10k-$0",      "pnl_cohort_as_of": "2026-10-22T00:00:00+00:00",      "pnl_cohort_basis": "point_in_time",      "opened_at": "2026-10-06T11:48:00+00:00"    }  ],  "nextCursor": "eyJhIjoiQlRDIiwiZCI6MSwibSI6Imhpc3QxaCIsInQiOiIyMDI2LTEwLTIyIDAwOjAzOjAwIiwidyI6IjB4MDM3YTRjMGIyMGM5ZDIwNTc2NWQ5Yzg3NzI5Yzc5YjQ0YzhhYTY0MCJ9",  "label_computed": {    "grading": "realized",    "lookahead": false,    "resolution": "hourly"  }}