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

# Stacks

> Standardized Stacks tables, with Clarity contract calls and asset events.

`stacks` holds the standardized Stacks tables. Stacks sits on top of Bitcoin and runs contracts of its own, written in a language called Clarity, so its tables differ from the rest of the Bitcoin family: `blocks` and `transactions` carry extra columns for that, and a third table, `events`, records asset movements, locked STX (the chain's own token), and the notes its contracts write.

## Tables

<table>
  <thead>
    <tr>
      <th width="150">Table</th>
      <th width="90">Since</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>blocks</code></td>
      <td>2024-04</td>
      <td>One row per block, with burn-block anchoring and execution cost totals.</td>
    </tr>

    <tr>
      <td><code>transactions</code></td>
      <td>2024-04</td>
      <td>One row per transaction, with the columns its Clarity type populates.</td>
    </tr>

    <tr>
      <td><code>events</code></td>
      <td>2021-01</td>
      <td>One row per event: asset transfers, STX locks and contract logs.</td>
    </tr>
  </tbody>
</table>

## Sample queries

<Tabs>
  <Tab title="Events by type">
    **Count events by type on one day.**

    ```sql theme={null}
    select
        event_type,
        count(*) as events
    from `stacks.events`
    where block_timestamp >= timestamp('2026-08-20')
      and block_timestamp < timestamp('2026-08-21')
    group by event_type
    order by events desc
    ```
  </Tab>

  <Tab title="Priced tokens">
    **List the Stacks tokens that carried a daily price over one week.**

    ```sql theme={null}
    with priced as (
        select
            token_id,
            avg(price) as avg_price,
            count(*) as price_days
        from `metrics_tokens.price_daily`
        where timestamp >= timestamp('2026-08-16')
          and timestamp < timestamp('2026-08-23')
          and chain_id = 'stacks'
        group by token_id
    )

    select
        tokens.symbol,
        tokens.name,
        priced.avg_price,
        priced.price_days
    from priced
    join `dimensions.tokens` as tokens using (token_id)
    order by priced.avg_price desc
    limit 20
    ```
  </Tab>
</Tabs>

## Notes

`blocks` and `transactions` start on 2024-04-16, so `events` is the only table with history before 2024. Transactions are keyed on `transaction_id`, and events on `transaction_id` and `event_index`.

Stacks transactions come in several kinds, and `transaction_type` says which. Which columns are filled in follows from that: `token_transfer_*` for a transfer, `contract_call_*` for a call into a contract, `smart_contract_*` for publishing one. The rest are empty.

Because Stacks runs contracts, its tokens reach the catalog's token list where the rest of the Bitcoin family's do not, and some carry a daily USD price. No app, pool or tokenized asset table covers Stacks.

[Tokens](/docs/catalog/tokens/index) covers the token list and the daily price table in depth. [Chains](/docs/catalog/chains/index) covers the list of chains we track.
