> ## 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.

# rwa_hyperliquid.perp_metrics_daily

> Daily volume, open interest, funding rate, and taker activity per RWA perpetual market on Hyperliquid HIP-3.

export const PremiumDatasetAccessCard = ({href = "https://dune.com/enterprise#contact-form"}) => <Card title="Premium dataset access" icon="info" href={href}>
    This dataset is part of a premium offering and requires additional access. Contact the Dune enterprise team to request access.
  </Card>;

`rwa_hyperliquid.perp_metrics_daily` is the daily rollup of [`perp_metrics_hourly`](/data-catalog/curated/rwa/activity/perp-metrics-hourly). Grain: one row per market per day, keyed on `(block_month, block_date, perp_dex, coin)`. This is the right table for trend charts, day-over-day comparisons, and market league tables.

<PremiumDatasetAccessCard />

## Table schema

| Column                    | Type        | Description                                                                                            |
| ------------------------- | ----------- | ------------------------------------------------------------------------------------------------------ |
| `block_month`             | `DATE`      | Partition column                                                                                       |
| `block_date`              | `DATE`      | Day bucket, UTC                                                                                        |
| `blockchain`              | `VARCHAR`   | Always `hyperliquid`                                                                                   |
| `perp_dex`                | `VARCHAR`   | Builder DEX short code                                                                                 |
| `market_symbol`           | `VARCHAR`   | Market ticker within the builder DEX                                                                   |
| `coin`                    | `VARCHAR`   | Full market id in `dex:SYMBOL` form                                                                    |
| `asset_id`                | `INTEGER`   | HIP-3 asset id                                                                                         |
| `asset_class`             | `VARCHAR`   | RWA classification: `rates`, `equities`, `credit`, `fx`, `commodities`, `private_funds`, `real_estate` |
| `asset_type`              | `VARCHAR`   | Finer classification within `asset_class`                                                              |
| `underlying_ticker`       | `VARCHAR`   | Ticker of the referenced real-world instrument                                                         |
| `builder_name`            | `VARCHAR`   | Builder DEX full name                                                                                  |
| `trades_count`            | `BIGINT`    | Taker fills in the day                                                                                 |
| `volume_usd`              | `DOUBLE`    | Taker-leg notional volume in USD. Matches Hyperliquid's reported `dayNtlVlm`                           |
| `volume_units`            | `DOUBLE`    | Volume in contract units                                                                               |
| `buy_volume_usd`          | `DOUBLE`    | Taker buy volume                                                                                       |
| `sell_volume_usd`         | `DOUBLE`    | Taker sell volume                                                                                      |
| `unique_takers`           | `BIGINT`    | Distinct taker addresses in the day                                                                    |
| `vwap`                    | `DOUBLE`    | Volume-weighted average fill price                                                                     |
| `open_interest_units`     | `DOUBLE`    | End-of-day open interest in contract units, **both sides summed**                                      |
| `open_interest_usd`       | `DOUBLE`    | End-of-day open interest valued in USD                                                                 |
| `open_positions`          | `BIGINT`    | Count of open positions at end of day                                                                  |
| `funding_rate`            | `DOUBLE`    | Funding rate for the day                                                                               |
| `funding_rate_annualized` | `DOUBLE`    | Funding rate annualized                                                                                |
| `_updated_at`             | `TIMESTAMP` | When this row was last written by the pipeline                                                         |

## Flow versus stock

Two different kinds of measure share this table, and they aggregate differently:

* **Flows** — `volume_usd`, `volume_units`, `buy_volume_usd`, `sell_volume_usd`, `trades_count`. Sum these across days.
* **Stocks** — `open_interest_units`, `open_interest_usd`, `open_positions`. These are point-in-time end-of-day snapshots. Take the last value or an average; never sum them across days.

`unique_takers` is a distinct count within each day, so summing it across days double-counts anyone who traded on more than one day.

## Open interest is both-sides

`open_interest_units` and `open_interest_usd` sum longs and shorts to match the Hyperliquid UI. One-sided open interest, the convention most traditional venues report, is half:

```sql theme={null}
open_interest_units / 2 AS one_sided_open_interest
```

## The current day is always partial

Today's row is incomplete until the day closes. Filter it out for trend work:

```sql theme={null}
WHERE block_date < current_date
```

## Example query

```sql theme={null}
-- Market league table over the last 30 complete days
SELECT
  market_symbol,
  builder_name,
  asset_class,
  SUM(volume_usd) AS volume_usd_30d,
  SUM(trades_count) AS fills_30d,
  MAX_BY(open_interest_usd, block_date) AS latest_open_interest_usd
FROM rwa_hyperliquid.perp_metrics_daily
WHERE block_date >= current_date - INTERVAL '30' day
  AND block_date < current_date
GROUP BY 1, 2, 3
ORDER BY 4 DESC
LIMIT 30
```

**Asset class trend, tokenized versus synthetic comparison starting point:**

```sql theme={null}
SELECT
  block_date,
  asset_class,
  SUM(volume_usd) AS volume_usd,
  SUM(open_interest_usd) AS open_interest_usd
FROM rwa_hyperliquid.perp_metrics_daily
WHERE block_date >= current_date - INTERVAL '90' day
  AND block_date < current_date
GROUP BY 1, 2
ORDER BY 1 DESC, 3 DESC
```

Note that summing `open_interest_usd` across markets within one day is valid — those are distinct positions at the same instant. Summing it across days is not.
