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

# hyperliquid.perp_oracle_prices

> Minute-cadence oracle, mark and mid prices for Hyperliquid perpetual markets, with the signed mark-oracle spread in basis points.

export const PremiumDatasetAccessCard = ({href = "https://dune.com/enterprise#contact-form", note = null}) => <Card title="Gated dataset" icon="lock" href={href}>
    Querying this dataset requires an entitlement on your workspace. See <a href="/data-catalog/overview#access-tiers-public-vs-gated-datasets">access tiers</a>, or contact the Dune team to enable access.
    {note && <><br /><br />{note}</>}
  </Card>;

`hyperliquid.perp_oracle_prices` is the price-reference table for the Hyperliquid perpetual futures venue. Grain: one row per `(coin, block_minute)` on a fixed one-minute grid, carrying the last update published inside the minute rather than an average. It covers both first-party perps (`coin` = `BTC`) and HIP-3 builder-deployed markets (`coin` = `dex:SYMBOL`, e.g. `xyz:TSLA`), and `price_source` says which family a row belongs to and therefore which price columns are populated.

<PremiumDatasetAccessCard />

## Table schema

| Column                   | Type                          | Description                                                                                                                                                                                                             |
| ------------------------ | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `block_month`            | `DATE`                        | Month of `block_minute`. Partition column                                                                                                                                                                               |
| `block_date`             | `DATE`                        | Date of `block_minute`                                                                                                                                                                                                  |
| `block_minute`           | `TIMESTAMP(3) WITH TIME ZONE` | Start of the one-minute bucket, UTC. Grain, with `coin`. A grid position, not the moment a price was set                                                                                                                |
| `perp_dex`               | `VARCHAR`                     | `hyperliquid` for first-party perps, otherwise the builder dex code. Derived from the `coin` prefix                                                                                                                     |
| `coin`                   | `VARCHAR`                     | Venue-native market id, `BTC` or `dex:SYMBOL`. Grain with `block_minute`, and the join key to `perp_market_details`                                                                                                     |
| `market_symbol`          | `VARCHAR`                     | Ticker with any `dex:` prefix removed. Two dexes can list the same ticker, so never a join key                                                                                                                          |
| `asset_id`               | `BIGINT`                      | Protocol asset id: the asset index for first-party perps, `100000 + dex_index * 10000 + asset_index` for HIP-3. Null when the market's registry entry cannot be resolved                                                |
| `oracle_price`           | `DOUBLE`                      | External reference price funding pulls the perp toward, constructed independently of Hyperliquid's own book. Always populated and always above zero                                                                     |
| `mark_price`             | `DOUBLE`                      | The price margining, liquidations, stop and take-profit triggers and unrealised PnL are computed against. Deployer-nominated on HIP-3 rows; null where a deployer priced the market but omitted it from the mark update |
| `mid_price`              | `DOUBLE`                      | Midpoint of best bid and best ask on Hyperliquid's order book. First-party rows only                                                                                                                                    |
| `premium`                | `DOUBLE`                      | Book premium over the oracle as a fraction of `oracle_price`, and the input the funding rate is computed from. First-party rows only                                                                                    |
| `mark_oracle_spread_bps` | `DOUBLE`                      | `(mark_price - oracle_price) / oracle_price * 10000`, signed, positive when the mark sits above the oracle                                                                                                              |
| `impact_bid_price`       | `DOUBLE`                      | VWAP fill of a hypothetical market sell of the market's impact notional against the resting bids. First-party rows only                                                                                                 |
| `impact_ask_price`       | `DOUBLE`                      | VWAP fill of the same-sized hypothetical market buy against the resting asks. First-party rows only                                                                                                                     |
| `price_source`           | `VARCHAR`                     | `asset_ctxs` for a first-party perp, `set_oracle` for a HIP-3 market. Decides which of the optional columns are populated                                                                                               |
| `source_updates`         | `INTEGER`                     | Published updates folded into this minute, of which the last one wins. Always 1 on `asset_ctxs` rows, often higher on `set_oracle` rows                                                                                 |
| `_updated_at`            | `TIMESTAMP(3) WITH TIME ZONE` | Build timestamp                                                                                                                                                                                                         |

## price\_source decides which columns are populated

| `price_source` | Markets                              | Beyond oracle and mark                                         | History from |
| -------------- | ------------------------------------ | -------------------------------------------------------------- | ------------ |
| `asset_ctxs`   | first-party perps, unprefixed `coin` | `mid_price`, `premium`, `impact_bid_price`, `impact_ask_price` | 2023-05-20   |
| `set_oracle`   | HIP-3 builder-deployed, `dex:SYMBOL` | nothing — a deployer publishes prices, not book state          | 2025-10-13   |

The two families come from different upstream mechanisms, which is why coverage is asymmetric. First-party rows come from Hyperliquid's own asset-contexts series, which carries no HIP-3 rows at all and is re-pulled in batches that trail the present by weeks; every HIP-3 row is reconstructed from deployer `setOracle` actions, which land close to real time. Publishing is also not universal among builder dexes — nine of the ten had published prices as of 2026-08-21, and markets on the tenth have no rows here. So the two families do not reach the same latest minute: check `MAX(block_minute)` per `price_source` before comparing a recent window across them.

The split is exact on the `coin` prefix: `asset_ctxs` coins are never dex-prefixed and `set_oracle` coins always are, so filtering on `price_source` and filtering on the prefix select the same rows.

## No carry-forward

A minute with no published update produces no row, so gaps are genuine absences of published prices rather than nulls to interpolate. Take the last row at or before your cutoff instead of matching a minute exactly, and bound `block_month` alongside `block_minute` so the query prunes partitions:

```sql theme={null}
SELECT
  coin,
  MAX_BY(oracle_price, block_minute) AS oracle_price,
  MAX_BY(mark_price, block_minute) AS mark_price,
  MAX(block_minute) AS priced_at
FROM hyperliquid.perp_oracle_prices
WHERE block_month >= DATE '2026-07-01'
  AND block_minute < TIMESTAMP '2026-08-20 12:00'
GROUP BY 1
```

## Mark price means different things per family

On a first-party row, `mark_price` is Hyperliquid's own published mark: a blend of the oracle, the drift of its book away from the oracle, its own bid/ask/last, and other venues' perp mids. On a HIP-3 row it is the mark the dex deployer nominates. Some deployers derive it independently and some simply republish the oracle they just set — one dex has done both in different periods.

That carries straight into `mark_oracle_spread_bps`: a deployer echoing its oracle shows exactly zero, regardless of what the book did. Read `mark_price` before comparing spreads across dexes, and do not read a small spread on a HIP-3 market as a tight market. `mark_price` is never filled in from `oracle_price` where it is missing, so coalesce yourself if that assumption suits your analysis.

## Premium and the impact prices

`impact_bid_price` and `impact_ask_price` are the volume-weighted fill prices of a hypothetical market sell and market buy of the market's impact notional — 20,000 USDC on BTC and ETH, 6,000 USDC on every other market — against the resting book. The clip is deliberately small: large enough to average across several price levels so a token-sized quote at the top of the book cannot move it, small enough to still describe the price ordinary flow gets. It is not a slippage estimate for a large order.

`premium` is derived from that pair rather than from top-of-book, so it reflects where a real clip would trade. Its sign drives funding: an impact ask below the oracle pushes funding negative, an impact bid above it pushes funding positive.

## Market classification

Nothing here classifies the market. Join [`perp_market_details`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-details) on `coin` for asset class, asset type, underlying ticker and leverage caps.
