vike

Recipe 49 of 65

Hourly open interest and position count history of a Hyperliquid coin

/v1/hl-cohorts/symbols/{symbol}/metrics returns one row per hour with position_count, long count, long and total notional in USD and bias; /v1/hyperliquid/symbols/hourly adds the venue's own open interest per hour.

GET /v1/hl-cohorts/symbols/{symbol}/metrics answers it in one call, as the hourly series of one coin's open positions: how many there are, how many are long, their notional in USD and in coins, and the long/short bias. One row per hour, newest first, up to 5,000 per call with a cursor. The venue's own open-interest figure per hour is in GET /v1/hyperliquid/symbols/hourly. The full parameter lists are on Coin metrics and Coins hourly.

Quick answer

Put the coin in the path; limit counts settled hours.

cURL
# the newest hourly rows for BTC; the first row is the hour still in progress
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hl-cohorts/symbols/BTC/metrics?limit=3"

Example response

Captured from the live API on 2026-10-24 at 17:16 UTC, all 4 rows: the 3 settled hours limit=3 asked for plus the provisional one.

total_position_value is long plus short notional in USD, total_position_size the same in BTC, and the _long fields the long half. bias is (long - short) / (long + short) of the notional, from -1 to +1. At 16:00 UTC, 40,980 BTC positions were open, 28,301 of them long, worth $3.50B together: more long positions, but the same notional on each side.

Example response
{
  "axis": "size",
  "label_basis": "point_in_time",
  "metrics": [
    {
      "ts": "2026-10-24T17:12:00+00:00",
      "position_count": 40443,
      "position_count_long": 28092,
      "total_position_value": 3499772681.0,
      "total_position_value_long": 1749886340.0,
      "total_unrealized_pnl": -18790803.32,
      "total_position_size": 43633.16686,
      "total_position_size_long": 21816.58343,
      "bias": 1.362480371e-16,
      "provisional": true,
      "label_basis": "point_in_time"
    },
    {
      "ts": "2026-10-24T16:00:00+00:00",
      "position_count": 40980,
      "position_count_long": 28301,
      "total_position_value": 3496992154.0,
      "total_position_value_long": 1754715474.0,
      "total_unrealized_pnl": -18758168.16,
      "total_position_size": 43774.85108,
      "total_position_size_long": 21965.44878,
      "bias": 0.003556997881,
      "provisional": false,
      "label_basis": "point_in_time"
    },
    {
      "ts": "2026-10-24T15:00:00+00:00",
      "position_count": 43139,
      "position_count_long": 30142,
      "total_position_value": 3535220134.0,
      "total_position_value_long": 1766377155.0,
      "total_unrealized_pnl": -18551843.77,
      "total_position_size": 44318.04722,
      "total_position_size_long": 22143.18404,
      "bias": -0.0006975022258,
      "provisional": false,
      "label_basis": "point_in_time"
    },
    {
      "ts": "2026-10-24T14:00:00+00:00",
      "position_count": 44005,
      "position_count_long": 31098,
      "total_position_value": 3589074596.0,
      "total_position_value_long": 1825255808.0,
      "total_unrealized_pnl": -19778971.1,
      "total_position_size": 44729.32486,
      "total_position_size_long": 22746.32529,
      "bias": 0.01711778857,
      "provisional": false,
      "label_basis": "point_in_time"
    }
  ],
  "nextCursor": "eyJtIjoibWV0cmljcyIsInQiOiIyMDI2LTEwLTI0IDE0OjAwOjAwIn0"
}

Variations

The venue's own open interest beside the close. The hourly panel carries the venue's open_interest in coins (averaged over the hour) next to the traded close.

cURL — venue open interest
# BTC hourly close, open interest, funding rate and premium for the last day
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hyperliquid/symbols/hourly?symbols=BTC&days=1"

On the same capture its 16:00 row read open_interest 43,345.13 BTC at a close of 80,175: within 1% of the total_position_size of 43,774.85 in the Example response.

A pinned history. Page back with nextCursor, or pin a window; limit is one row per hour, so 168 is a week.

cURL — a week
# one week of hourly BTC rows
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hl-cohorts/symbols/BTC/metrics?start=2026-10-10T00:00:00Z&end=2026-10-16T23:59:59Z&limit=168"

Only newly opened positions. openedWithin=24h counts, for each hour, only the positions opened in the 24 hours before that hour.

cURL — new positions
# hourly BTC positioning of positions opened within the previous 24 hours
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hl-cohorts/symbols/BTC/metrics?openedWithin=24h&limit=48"

A HIP-3 market. A builder-dex market is a symbol like any other, with its dex prefix.

cURL — HIP-3
# hourly positioning in the XYZ platinum perp
curl -H "X-API-Key: $VIKE_API_KEY" \
  "https://data.vike.io/v1/hl-cohorts/symbols/xyz:PLATINUM/metrics?limit=24"

Before you rely on it

Drop the provisional row before you store the series

The settled hours land 60 to 120 minutes late, so the first row (provisional: true) is read from the newest 5-minute snapshot instead. Its ts is a snapshot instant, not an hour, and it changes on every poll. Keep it for a live view and drop it before you persist a series. It appears only on the first page of a window that reaches the present.

Two open-interest figures, two units

total_position_value here is USD summed over the open positions; open_interest in /symbols/hourly is the venue's figure in coins, averaged over the hour's samples. Multiply it by close for USD before you compare, and expect a small gap rather than an exact match.

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: symbol_metrics, at 1 credit a call.

Ask your agent
Show the hourly open interest and position count of BTC on Hyperliquid for the last 24 hours
Example response
{  "axis": "size",  "label_basis": "point_in_time",  "metrics": [    {      "ts": "2026-10-24T17:12:00+00:00",      "position_count": 40443,      "position_count_long": 28092,      "total_position_value": 3499772681.0,      "total_position_value_long": 1749886340.0,      "total_unrealized_pnl": -18790803.32,      "total_position_size": 43633.16686,      "total_position_size_long": 21816.58343,      "bias": 1.362480371e-16,      "provisional": true,      "label_basis": "point_in_time"    },    {      "ts": "2026-10-24T16:00:00+00:00",      "position_count": 40980,      "position_count_long": 28301,      "total_position_value": 3496992154.0,      "total_position_value_long": 1754715474.0,      "total_unrealized_pnl": -18758168.16,      "total_position_size": 43774.85108,      "total_position_size_long": 21965.44878,      "bias": 0.003556997881,      "provisional": false,      "label_basis": "point_in_time"    },    {      "ts": "2026-10-24T15:00:00+00:00",      "position_count": 43139,      "position_count_long": 30142,      "total_position_value": 3535220134.0,      "total_position_value_long": 1766377155.0,      "total_unrealized_pnl": -18551843.77,      "total_position_size": 44318.04722,      "total_position_size_long": 22143.18404,      "bias": -0.0006975022258,      "provisional": false,      "label_basis": "point_in_time"    },    {      "ts": "2026-10-24T14:00:00+00:00",      "position_count": 44005,      "position_count_long": 31098,      "total_position_value": 3589074596.0,      "total_position_value_long": 1825255808.0,      "total_unrealized_pnl": -19778971.1,      "total_position_size": 44729.32486,      "total_position_size_long": 22746.32529,      "bias": 0.01711778857,      "provisional": false,      "label_basis": "point_in_time"    }  ],  "nextCursor": "eyJtIjoibWV0cmljcyIsInQiOiIyMDI2LTEwLTI0IDE0OjAwOjAwIn0"}