> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# hip4_hyperliquid.open_interest_hourly

> Hyperliquid HIP-4 hourly open interest and traded volume per market, from first activity to settlement.

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

The `hip4_hyperliquid.open_interest_hourly` table provides hourly open interest and traded volume per Hyperliquid HIP-4 market. Grain: one row per `(hour, market_id)`, with a row for every hour from the market's first activity to its settlement. Open interest is a level at the end of the hour; volume is the flow within it.

Open interest is built from the full token ledger (trades, splits, merges, negations and settlements) and excludes the venue's settlement counterparty. It is counted **per side**. On standalone markets the Yes and No sides are equal. On event members they can diverge once No tokens are converted into Yes tokens of sibling outcomes. `event_oi_contracts` gives the collateral locked behind the whole event.

<Warning>
  `event_oi_contracts` is repeated on every member row of an event. Summing it across members overstates event open interest. Take it once per `event_id` and `hour`.
</Warning>

Per-token prices are in [`hip4_hyperliquid.ohlcv_hourly`](/data-catalog/curated/prediction-markets/hip4/ohlcv_hourly).

## Table Schema

| Column                    | Type        | Description                                                                                                                                                                                                        |
| ------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `block_month`             | `DATE`      | First day of the UTC month of `hour`. Partition key                                                                                                                                                                |
| `hour`                    | `TIMESTAMP` | UTC hour the figures describe. Open interest is the level at the end of it, volume the flow within it                                                                                                              |
| `market_id`               | `VARCHAR`   | Market identifier. Joins `hip4_hyperliquid.market_details`                                                                                                                                                         |
| `event_id`                | `VARCHAR`   | Event this market is one outcome of. NULL for standalone markets and where the venue has not published the grouping                                                                                                |
| `market_oi_yes_contracts` | `DOUBLE`    | Yes tokens outstanding at the end of the hour. Zero once the market settles and every holder has been paid                                                                                                         |
| `market_oi_no_contracts`  | `DOUBLE`    | No tokens outstanding at the end of the hour. Equal to the Yes side except on event members                                                                                                                        |
| `event_oi_contracts`      | `DOUBLE`    | Collateral locked behind the market's event: the Yes tokens of one member plus the No tokens of every other member. Equal to the Yes side on a standalone market. One contract pays 1 unit of the quote stablecoin |
| `volume_contracts`        | `DOUBLE`    | Outcome tokens traded in the hour, both sides together, each match counted once                                                                                                                                    |
| `volume_usd`              | `DOUBLE`    | Cash traded in the hour in the quote stablecoin, each match counted once from the aggressor's side                                                                                                                 |
| `trade_count`             | `BIGINT`    | Matches in the hour, both sides together                                                                                                                                                                           |
| `_updated_at`             | `TIMESTAMP` | When this row was last written by the pipeline                                                                                                                                                                     |

## Table sample

<TableSample tableSchema="hip4_hyperliquid" tableName="open_interest_hourly" />

## Query performance

`block_month` is the partition key. Always include a `block_month` or `hour` filter.

## Example query

```sql theme={null}
-- Standalone markets with the most open interest at the latest hour
SELECT
  o.market_id,
  m.title,
  o.market_oi_yes_contracts,
  o.volume_usd
FROM hip4_hyperliquid.open_interest_hourly o
JOIN hip4_hyperliquid.market_details m
  ON m.market_id = o.market_id
WHERE o.block_month = DATE_TRUNC('month', CURRENT_DATE)
  AND o.hour = (
    SELECT MAX(hour)
    FROM hip4_hyperliquid.open_interest_hourly
    WHERE block_month = DATE_TRUNC('month', CURRENT_DATE)
  )
  AND m.market_type = 'standalone'
ORDER BY o.market_oi_yes_contracts DESC
LIMIT 20
```
