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

# Registry

> Market identity for both market kinds: what they track, what they settle in, and which apps get credit.

The identity tables behind every perpetual and order-book figure. Every fact and metric joins to one of them, and [Coverage](https://tokenterminal.com/docs/catalog/perpetuals.md) introduces each grain.

## Tables

**Projects**

One row per project in the catalog.

<table>
  <thead>
    <tr>
      <th width="230">Column</th>
      <th width="120">Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`project_id`</td><td>STRING</td><td>The project, such as `aave`.</td></tr>
    <tr><td>`slug`</td><td>STRING</td><td>The project's key in Token Terminal page URLs. It differs from `project_id` where the page URL is hyphenated (`redstone-chain` for `redstonechain`).</td></tr>
    <tr><td>`url`</td><td>STRING</td><td>The project's page on the Token Terminal Explorer.</td></tr>
    <tr><td>`name`</td><td>STRING</td><td>Display name.</td></tr>
    <tr><td>`symbol`</td><td>STRING</td><td>Ticker of the project's token, where it has one.</td></tr>
    <tr><td>`logo`</td><td>STRING</td><td>Public URL of the project logo, a PNG. Its `?logo_hash=` suffix changes whenever the image does. Null for a project whose image was never uploaded.</td></tr>
    <tr><td>`description`</td><td>STRUCT</td><td>The project copy: `what` the project is, `who` it serves and `how` it works.</td></tr>
    <tr><td>`links`</td><td>ARRAY\<STRUCT></td><td>The project's links as `type` and `url` pairs (website, x, docs, github). `type` is the label as written, so `twitter` and `x` both occur.</td></tr>
    <tr><td>`market_sectors`</td><td>ARRAY\<STRING></td><td>Every market sector the project belongs to, as tag ids, primary first. Unnesting it yields one row per sector.</td></tr>
    <tr><td>`primary_market_sector`</td><td>STRING</td><td>The market sector the project is listed under: the first element of `market_sectors`. One value per row.</td></tr>
    <tr><td>`listing_date`</td><td>TIMESTAMP</td><td>When the project was listed on Token Terminal.</td></tr>
    <tr><td>`coingecko_id`</td><td>STRING</td><td>The project token's CoinGecko id.</td></tr>
    <tr><td>`coinmarketcap_id`</td><td>STRING</td><td>The project token's CoinMarketCap id.</td></tr>
  </tbody>
</table>

**Apps**

One row per app in the catalog.

<table>
  <thead>
    <tr>
      <th width="230">Column</th>
      <th width="120">Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`app_id`</td><td>STRING</td><td>The app, such as `aave-v3`.</td></tr>
    <tr><td>`project_id`</td><td>STRING</td><td>The project operating it.</td></tr>
    <tr><td>`name`</td><td>STRING</td><td>Display name.</td></tr>
    <tr><td>`market_sectors`</td><td>ARRAY\<STRING></td><td>Every sector the app is tagged with.</td></tr>
    <tr><td>`primary_market_sector`</td><td>STRING</td><td>The first of those, for grouping.</td></tr>
    <tr><td>`created_at`</td><td>TIMESTAMP</td><td>When the app was added.</td></tr>
  </tbody>
</table>

**Perp markets**

One row per perpetual futures market. Each market credits two apps, the venue that settles its trades and the interface it is listed under.

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

  <tbody>
    <tr>
      <td>`perp_market_id`</td>
      <td>`STRING`</td>
      <td>Identifier of the market: the registered market key joined with the chain on HyperCore; `{pool_address}:{asset_index}-{chain_id}` on MUX.</td>
    </tr>

    <tr>
      <td>`project_id`</td>
      <td>`STRING`</td>
      <td>Project the exchange app belongs to.</td>
    </tr>

    <tr>
      <td>`interface_app_id`</td>
      <td>`STRING`</td>
      <td>The builder credited for the market. Every fill in the market has this one value, and a market's whole volume lands under one interface app.</td>
    </tr>

    <tr>
      <td>`chain_id`</td>
      <td>`STRING`</td>
      <td>Chain the market settles on.</td>
    </tr>

    <tr>
      <td>`exchange_app_id`</td>
      <td>`STRING`</td>
      <td>The venue that settles the trades. It matches `interface_app_id` on a venue's own markets and differs on a builder-deployed HIP-3 market, where the engine is `hyperliquid-perps` and the interface is the listing builder.</td>
    </tr>

    <tr>
      <td>`quote_asset_id`</td>
      <td>`STRING`</td>
      <td>The token positions settle in, keyed like `dimensions.assets`. Null on MUX markets, which accept several collateral tokens and price in USD.</td>
    </tr>

    <tr>
      <td>`base_reference_asset_id`</td>
      <td>`STRING`</td>
      <td>The reference asset whose price the market follows, keyed like `dimensions.reference_assets`. Null where the market's asset has no reference-asset mapping.</td>
    </tr>

    <tr>
      <td>`name`</td>
      <td>`STRING`</td>
      <td>Readable market name, for example `BTC Perpetual`.</td>
    </tr>

    <tr>
      <td>`status`</td>
      <td>`STRING`</td>
      <td>Listing status from the market registry, such as `active`. Null for markets identified from executions.</td>
    </tr>
  </tbody>
</table>

**Order book markets**

One row per order-book market that has traded, covering spot books and outcome markets. An order-book market runs under a single app, and has one credit column where a perpetual market has a pair.

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

  <tbody>
    <tr>
      <td>`order_book_market_id`</td>
      <td>`STRING`</td>
      <td>Identifier of the market: the venue's book identifier joined with the chain.</td>
    </tr>

    <tr>
      <td>`project_id`</td>
      <td>`STRING`</td>
      <td>Project the operating app belongs to.</td>
    </tr>

    <tr>
      <td>`app_id`</td>
      <td>`STRING`</td>
      <td>The app running the book.</td>
    </tr>

    <tr>
      <td>`chain_id`</td>
      <td>`STRING`</td>
      <td>Chain the book settles on.</td>
    </tr>

    <tr>
      <td>`quote_asset_id`</td>
      <td>`STRING`</td>
      <td>The token volume is measured in, keyed like `dimensions.assets`. Every accepted quote token is a dollar stablecoin (`usdc`, `usdh`, `usdt0`, `usde`), so a trade's size times its price is already its dollar value.</td>
    </tr>

    <tr>
      <td>`base_symbol`</td>
      <td>`STRING`</td>
      <td>Symbol of the traded token, as the venue lists it. Several contracts can share one symbol.</td>
    </tr>

    <tr>
      <td>`name`</td>
      <td>`STRING`</td>
      <td>Readable pair name, for example `HYPE/USDC`.</td>
    </tr>

    <tr>
      <td>`created_at`</td>
      <td>`TIMESTAMP`</td>
      <td>Time of the first trade seen in the market, which is what puts the row in this table.</td>
    </tr>
  </tbody>
</table>

## Sample queries

**Markets per interface app**

`interface_app_id` is the builder a market is listed under, and on a venue's own markets it holds the same value as `exchange_app_id`.

```sql theme={null}
select
    interface_app_id,
    count(*) as markets
from `dimensions.perp_markets`
group by interface_app_id
order by markets desc
```

**Builder-deployed markets**

A HIP-3 market is one where the matching engine and the listing builder are different apps. Compare `exchange_app_id` against `interface_app_id`.

```sql theme={null}
select
    perp_market_id,
    name,
    exchange_app_id,
    interface_app_id,
    base_reference_asset_id
from `dimensions.perp_markets`
where exchange_app_id != interface_app_id
order by interface_app_id, perp_market_id
```

**Order books per app and quote asset**

`quote_asset_id` is the token the book prices in, and every accepted one is a dollar stablecoin, so grouping by it splits the books by settlement currency.

```sql theme={null}
select
    app_id,
    quote_asset_id,
    count(*) as markets
from `dimensions.order_book_markets`
group by app_id, quote_asset_id
order by markets desc
```

**Pool markets by chain**

MUX market identifiers combine the pool address, asset index and settlement chain. A market can accept several collateral tokens, and its reference asset identifies what its price follows.

```sql theme={null}
select
    perp_market_id,
    chain_id,
    name,
    base_reference_asset_id,
    quote_asset_id
from `dimensions.perp_markets`
where exchange_app_id = 'mux-perps'
order by chain_id, perp_market_id
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.