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

> ## Agent Instructions
> To query the Token Terminal data catalog, read https://tokenterminal.com/docs/catalog/agents-manual.md first. It is the whole catalog as one page: table naming grammar, key columns, partition and cluster rules, units, additivity, and the tables that are documented but not served yet.
> Never query a catalog table on a time bound alone. Also filter its cluster key, which you read from INFORMATION_SCHEMA.COLUMNS; an empty result means the object is a view, whose pruning contract is on its page. Compute is billed to the caller's own Google Cloud project.

# Perpetuals

> HyperCore perpetual markets and order books, their volume, open interest, funding and fees.

HyperCore runs two kinds of market and the Perpetuals band documents both. A perpetual market is a contract that tracks a price and never expires, such as `BTC Perpetual`. An order-book market is a cash market where the token itself changes hands through a book of resting orders, such as the `HYPE/USDC` spot book or an outcome market. Each kind has its own registry, its own daily tables and its own trade table.

* [`dimensions.perp_markets`](/docs/catalog/perpetuals/registry) and [`dimensions.order_book_markets`](/docs/catalog/perpetuals/registry): one row per market.
* [`metrics_perp_markets`](/docs/catalog/perpetuals/metrics) and [`metrics_order_book_markets`](/docs/catalog/perpetuals/metrics): one table per measure, one row per market per day. `metrics_perp_market_tokens` and `metrics_order_book_market_tokens` split a market by the token it settles or quotes in.
* [`facts_perp_markets.trades`](/docs/catalog/perpetuals/trades), [`facts_perp_markets.liquidations`](/docs/catalog/perpetuals/liquidations) and [`facts_order_book_markets.trades`](/docs/catalog/perpetuals/trades): one row per fill.

A perpetual market credits two apps. `exchange_app_id` is the venue whose matching engine settled the trade, and `interface_app_id` is the builder the market is listed under. The two hold the same value on a venue's own markets and differ on a builder-deployed HIP-3 market, where `hyperliquid-perps` is the engine. An order-book market runs under a single app and has one `app_id` where a perpetual market has the pair.

The money tables on both kinds have `chain_id`, `project_id` and `app_id`, so a HyperCore filter reads straight off them. The perpetual position and trader tables, such as `open_interest_daily` and `funding_rate_daily`, key on `perp_market_id` alone, so filter those through `dimensions.perp_markets`.

Every column is documented at [Perpetuals](/docs/catalog/perpetuals/index).

## Sample queries

<Tabs>
  <Tab title="Top perpetual markets">
    **Rank HyperCore perpetual markets by the notional settled on one day.** The exchange lens credits the matching engine, so it totals the venue's own markets and the HIP-3 markets it settles for builders in one figure.

    ```sql theme={null}
    select
        markets.name,
        markets.interface_app_id,
        sum(daily.notional_trading_volume) as notional_trading_volume
    from `metrics_perp_markets.exchange_notional_trading_volume_daily` as daily
    join `dimensions.perp_markets` as markets
        using (perp_market_id)
    where daily.timestamp >= timestamp('2026-08-20')
      and daily.timestamp < timestamp('2026-08-21')
      and daily.chain_id = 'hypercore'
    group by markets.name, markets.interface_app_id
    order by notional_trading_volume desc
    limit 20
    ```
  </Tab>

  <Tab title="Open interest and funding">
    **Follow one perpetual market's open interest and funding rate day by day.** Both tables key on `perp_market_id` alone, so the market identifier is the whole filter.

    ```sql theme={null}
    select
        positions.timestamp,
        positions.open_interest,
        funding.funding_rate
    from `metrics_perp_markets.open_interest_daily` as positions
    join `metrics_perp_markets.funding_rate_daily` as funding
        using (timestamp, perp_market_id)
    where positions.timestamp >= timestamp('2026-08-16')
      and positions.timestamp < timestamp('2026-08-23')
      and positions.perp_market_id = 'hlbtc-hypercore'
    order by positions.timestamp
    ```
  </Tab>

  <Tab title="Top order books">
    **Rank the HyperCore order books by the value traded over one week.** Every book here quotes in a dollar stablecoin, so the volume figure is already a dollar figure.

    ```sql theme={null}
    select
        markets.name,
        markets.app_id,
        sum(daily.trading_volume) as trading_volume
    from `metrics_order_book_markets.trading_volume_daily` as daily
    join `dimensions.order_book_markets` as markets
        using (order_book_market_id)
    where daily.timestamp >= timestamp('2026-08-16')
      and daily.timestamp < timestamp('2026-08-23')
      and daily.chain_id = 'hypercore'
    group by markets.name, markets.app_id
    order by trading_volume desc
    limit 20
    ```
  </Tab>

  <Tab title="HIP-3 markets">
    **Find the HyperCore markets a builder deployed rather than the venue, and the fees they produced.** A HIP-3 market is one where the matching engine and the listing builder are different apps, so comparing the two credit columns separates them.

    ```sql theme={null}
    select
        markets.name,
        markets.interface_app_id,
        sum(daily.fees) as fees
    from `metrics_perp_markets.fees_daily` as daily
    join `dimensions.perp_markets` as markets
        using (perp_market_id)
    where daily.timestamp >= timestamp('2026-08-16')
      and daily.timestamp < timestamp('2026-08-23')
      and daily.chain_id = 'hypercore'
      and markets.exchange_app_id != markets.interface_app_id
    group by markets.name, markets.interface_app_id
    order by fees desc
    limit 20
    ```
  </Tab>
</Tabs>
