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

# Metrics

> Daily volume, open positions, funding, liquidations, trader stats and fees per market.

Perpetuals metrics are four daily tables. `metrics.perp_markets_daily` and `metrics.order_book_markets_daily` hold one row per market per day. `metrics.perp_markets_tokens_daily` and `metrics.order_book_markets_tokens_daily` split each market by the token it settles in, one row per market per token per day, and that is where amounts are turned into dollars.

* `metrics.perp_markets_daily`: one row per perpetual market per day.
* `metrics.order_book_markets_daily`: one row per order-book market per day.
* `metrics.perp_markets_tokens_daily`: one row per perpetual market per settlement token per day.
* `metrics.order_book_markets_tokens_daily`: one row per order-book market per settlement token per day.

A few terms carry most of the meaning on this page. **Notional volume** is the total value of the contracts traded, each trade's price times its size, and is not the same as cash changing hands: a trader with $100 down can trade a contract worth $2,000, and it is the \$2,000 that notional volume counts. **Open interest** is the value of the positions still open at the end of the day, so volume is what was traded during the day while open interest is what is still on the books. The **funding rate** is the small recurring payment that passes between the two sides of a market to hold its price close to the price it tracks; a positive rate means the long side is paying the short side. **Liquidations** are positions the venue force-closed because the trader's deposit no longer covered their losses. And **top-10 trader share** is the fraction of one side's open positions, by value, held by its ten largest traders, so a high number means the market's exposure sits with very few accounts.

`exchange_notional_trading_volume` answers what traded on the venue. `interface_notional_trading_volume` answers what each front end brought in. Both columns exist so either ranking reads straight off the table. Use one or the other in a query, never both.

## Tables

<Tabs>
  <Tab title="Perp markets">
    One row per perpetual market per day, keyed `(perp_market_id, timestamp)`. Names and other details live on the registry table, so this carries only keys and figures. The two notional columns are the same trades credited two different ways: `exchange_notional_trading_volume` to the venue that matched them, `interface_notional_trading_volume` to the front end they came through. One row here is one market, and a market has exactly one of each, so on this table the two columns hold the same number; they only differ once rows are grouped by app.

    Figures that measure activity during the day read zero when nothing traded. Figures that measure a standing position, and the funding rate, are left empty where we have no reading. `funding_rate` is empty before 2025-09-27, where our funding history starts.

    <table>
      <thead>
        <tr>
          <th width="220">Column</th>
          <th width="130">Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr><td><code>timestamp</code></td><td><code>TIMESTAMP</code></td><td>Day the row covers, at UTC midnight.</td></tr>
        <tr><td><code>perp\_market\_id</code></td><td><code>STRING</code></td><td>Market the row measures, keyed like <code>dimensions.perp\_markets</code>.</td></tr>
        <tr><td><code>price</code></td><td><code>FLOAT64</code></td><td>The market's closing price in USD, carried forward on days nothing traded.</td></tr>
        <tr><td><code>exchange\_notional\_trading\_volume</code></td><td><code>BIGNUMERIC</code></td><td>Value of the contracts traded, in USD, credited to the venue that matched them. Each trade's price times its size, counting one side of each match.</td></tr>
        <tr><td><code>interface\_notional\_trading\_volume</code></td><td><code>BIGNUMERIC</code></td><td>The same figure, credited instead to the front end the trades came through.</td></tr>
        <tr><td><code>trades\_count</code></td><td><code>INT64</code></td><td>Trades matched in the market during the day.</td></tr>
        <tr><td><code>active\_traders</code></td><td><code>INT64</code></td><td>How many separate addresses traded in the market during the day.</td></tr>
        <tr><td><code>open\_interest</code></td><td><code>FLOAT64</code></td><td>Value of the positions still open at the close, in USD, counting one side only: whichever of the long and short side is larger.</td></tr>
        <tr><td><code>long\_open\_interest</code></td><td><code>FLOAT64</code></td><td>Value of the open long positions at the close, in USD.</td></tr>
        <tr><td><code>short\_open\_interest</code></td><td><code>FLOAT64</code></td><td>Value of the open short positions at the close, in USD.</td></tr>
        <tr><td><code>volume\_to\_open\_interest</code></td><td><code>BIGNUMERIC</code></td><td>The day's traded value divided by the value of the open positions: how many times over the day's trading turned those positions.</td></tr>
        <tr><td><code>long\_traders</code></td><td><code>INT64</code></td><td>Traders holding an open long position at the close.</td></tr>
        <tr><td><code>short\_traders</code></td><td><code>INT64</code></td><td>Traders holding an open short position at the close.</td></tr>
        <tr><td><code>average\_long\_position\_size</code></td><td><code>FLOAT64</code></td><td>Average value of an open long position at the close, in USD.</td></tr>
        <tr><td><code>average\_short\_position\_size</code></td><td><code>FLOAT64</code></td><td>Average value of an open short position at the close, in USD.</td></tr>
        <tr><td><code>median\_long\_position\_size</code></td><td><code>FLOAT64</code></td><td>Median value of an open long position at the close, in USD.</td></tr>
        <tr><td><code>median\_short\_position\_size</code></td><td><code>FLOAT64</code></td><td>Median value of an open short position at the close, in USD.</td></tr>
        <tr><td><code>top10\_long\_trader\_share</code></td><td><code>FLOAT64</code></td><td>Fraction of the open long positions, by value, held by the ten largest long traders.</td></tr>
        <tr><td><code>top10\_short\_trader\_share</code></td><td><code>FLOAT64</code></td><td>Fraction of the open short positions, by value, held by the ten largest short traders.</td></tr>
        <tr><td><code>funding\_rate</code></td><td><code>FLOAT64</code></td><td>The day's total funding rate: the 24 hourly rates added together. Funding is the payment that passes between the two sides to hold the market's price near the price it tracks. Positive means the longs paid the shorts.</td></tr>
        <tr><td><code>long\_liquidations</code></td><td><code>FLOAT64</code></td><td>Value of the long positions the venue force-closed during the day, in USD, because the trader's deposit no longer covered their losses.</td></tr>
        <tr><td><code>short\_liquidations</code></td><td><code>FLOAT64</code></td><td>Value of the short positions force-closed during the day, in USD.</td></tr>
        <tr><td><code>fees</code></td><td><code>BIGNUMERIC</code></td><td>Trading fees charged, in USD, before anything is shared out. Charged on each side of a trade separately.</td></tr>
        <tr><td><code>revenue</code></td><td><code>BIGNUMERIC</code></td><td>Fees minus the shares paid to the front end and to whoever listed the market.</td></tr>
        <tr><td><code>fees\_supply\_side</code></td><td><code>BIGNUMERIC</code></td><td>Those two shares: the part of the fees the venue does not keep.</td></tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="Order-book markets">
    One row per order-book market per day, keyed `(order_book_market_id, timestamp)`. Names and other details live on the registry table.

    <table>
      <thead>
        <tr>
          <th width="220">Column</th>
          <th width="130">Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr><td><code>timestamp</code></td><td><code>TIMESTAMP</code></td><td>Day the row covers, at UTC midnight.</td></tr>
        <tr><td><code>order\_book\_market\_id</code></td><td><code>STRING</code></td><td>Market the row measures, keyed like <code>dimensions.order\_book\_markets</code>.</td></tr>
        <tr><td><code>trading\_volume</code></td><td><code>BIGNUMERIC</code></td><td>USD value traded, counting one side of each match rather than both.</td></tr>
        <tr><td><code>fees</code></td><td><code>BIGNUMERIC</code></td><td>Trading fees charged, in USD, before anything is shared out. Charged on each side of a trade separately.</td></tr>
        <tr><td><code>revenue</code></td><td><code>BIGNUMERIC</code></td><td>Fees minus the share paid to the front end.</td></tr>
        <tr><td><code>fees\_supply\_side</code></td><td><code>BIGNUMERIC</code></td><td>That share: the part of the fees the venue does not keep.</td></tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="Perp markets × token">
    One row per perpetual market per settlement token per day, keyed `(perp_market_token_id, timestamp)`. The key is the market joined to its settlement token, so `hlbtc-hypercore-usdc` reads market then token. This is where amounts become dollars, and every broader figure for perpetual markets is these rows added up rather than measured again. Notional volume is one column here, not two: the exchange and interface versions differ only in which app gets the credit, and this table has no app column, so a second copy would just repeat the number. `fees` always equals `revenue` plus `fees_supply_side`, on every row.

    <table>
      <thead>
        <tr>
          <th width="220">Column</th>
          <th width="130">Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr><td><code>timestamp</code></td><td><code>TIMESTAMP</code></td><td>Day the row covers, at UTC midnight.</td></tr>
        <tr><td><code>perp\_market\_token\_id</code></td><td><code>STRING</code></td><td>Market and settlement token, joined with a hyphen.</td></tr>
        <tr><td><code>notional\_trading\_volume</code></td><td><code>BIGNUMERIC</code></td><td>Value of the contracts traded, in USD: each trade's price times its size, counting one side of each match.</td></tr>
        <tr><td><code>fees</code></td><td><code>BIGNUMERIC</code></td><td>Trading fees charged, in USD, before anything is shared out. Charged on each side of a trade separately.</td></tr>
        <tr><td><code>revenue</code></td><td><code>BIGNUMERIC</code></td><td>Fees minus the shares paid to the front end and to whoever listed the market.</td></tr>
        <tr><td><code>fees\_supply\_side</code></td><td><code>BIGNUMERIC</code></td><td>Those two shares: the part of the fees the venue does not keep.</td></tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="Order-book markets × token">
    One row per order-book market per settlement token per day, keyed `(order_book_market_token_id, timestamp)`.

    <table>
      <thead>
        <tr>
          <th width="220">Column</th>
          <th width="130">Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr><td><code>timestamp</code></td><td><code>TIMESTAMP</code></td><td>Day the row covers, at UTC midnight.</td></tr>
        <tr><td><code>order\_book\_market\_token\_id</code></td><td><code>STRING</code></td><td>Market and quote token, joined with a hyphen.</td></tr>
        <tr><td><code>trading\_volume</code></td><td><code>BIGNUMERIC</code></td><td>USD value traded, counting one side of each match rather than both.</td></tr>
        <tr><td><code>fees</code></td><td><code>BIGNUMERIC</code></td><td>Trading fees charged, in USD, before anything is shared out. Charged on each side of a trade separately.</td></tr>
        <tr><td><code>revenue</code></td><td><code>BIGNUMERIC</code></td><td>Fees minus the share paid to the front end.</td></tr>
        <tr><td><code>fees\_supply\_side</code></td><td><code>BIGNUMERIC</code></td><td>That share: the part of the fees the venue does not keep.</td></tr>
      </tbody>
    </table>
  </Tab>
</Tabs>

## Sample queries

<Tabs>
  <Tab title="One market's series">
    **Read one perpetual market's daily series.**

    ```sql theme={null}
    select
        timestamp,
        price,
        exchange_notional_trading_volume,
        open_interest,
        funding_rate,
        fees
    from `metrics.perp_markets_daily`
    where perp_market_id = 'hlbtc-hypercore'
      and timestamp >= timestamp('2026-06-01')
    order by timestamp
    ```
  </Tab>

  <Tab title="Order-book markets by volume">
    **Rank order-book markets by volume on one day.**

    ```sql theme={null}
    select
        panel.order_book_market_id,
        markets.name,
        markets.app_id,
        panel.trading_volume,
        panel.fees
    from `metrics.order_book_markets_daily` as panel
    join `dimensions.order_book_markets` as markets
        using (order_book_market_id)
    where panel.timestamp = timestamp('2026-08-01')
    order by panel.trading_volume desc
    limit 25
    ```
  </Tab>

  <Tab title="Market vs token check">
    **Check a market row against the sum of its token rows.**

    ```sql theme={null}
    select
        floor_panel.timestamp,
        sum(floor_panel.fees) as floor_fees,
        any_value(market_panel.fees) as market_fees
    from `metrics.perp_markets_tokens_daily` as floor_panel
    join `metrics.perp_markets_daily` as market_panel
        on floor_panel.perp_market_token_id = concat(market_panel.perp_market_id, '-usdc')
        and floor_panel.timestamp = market_panel.timestamp
    where market_panel.perp_market_id = 'hlbtc-hypercore'
      and floor_panel.timestamp >= timestamp('2026-08-01')
      and market_panel.timestamp >= timestamp('2026-08-01')
    group by floor_panel.timestamp
    order by floor_panel.timestamp
    ```
  </Tab>

  <Tab title="Sector total">
    **Sum the derivatives sector's daily notional volume and fees.** There is no table holding the derivatives sector as a single daily series: this groups the daily market table, joined to `dimensions.projects`, by day. Check membership with `in unnest(...)` as below, or filter on `primary_market_sector`, where every project appears exactly once; grouping by the raw `market_sectors` list with `unnest` in the from clause counts a project once per sector it carries.

    ```sql theme={null}
    select
        panel.timestamp,
        sum(panel.exchange_notional_trading_volume) as sector_volume,
        sum(panel.fees) as sector_fees
    from `metrics.perp_markets_daily` as panel
    join `dimensions.perp_markets` as markets
        using (perp_market_id)
    join `dimensions.projects` as projects
        on projects.project_id = markets.project_id
    where 'derivatives' in unnest(projects.market_sectors)
      and panel.timestamp >= timestamp('2026-08-01')
    group by panel.timestamp
    order by panel.timestamp
    ```
  </Tab>
</Tabs>

## Notes

Amounts add up. Notional volume, trade counts, liquidations and the fee columns all total cleanly across markets and days, as long as you pick one of the two notional columns and stay with it. Counts of distinct traders do not add up: one address that traded in five markets is one trader, but adding those five markets' `active_traders` makes it five. Rates do not add up either: a sector-wide total of `funding_rate`, `volume_to_open_interest` or a top-10 share means nothing, so read those one market at a time, or weight them by market size yourself.
