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

A Stacks transaction comes in one of several kinds, and `transaction_type` says which. Each kind fills its own group of columns: `token_transfer_*` for a transfer, `contract_call_*` for a call into a contract, `smart_contract_*` for publishing one.

Because Stacks runs contracts, its tokens reach the catalog's token list, and some have a daily USD price. [Tokens](https://tokenterminal.com/docs/catalog/tokens/index.md) covers the token list and the daily price table in depth. [Chains](https://tokenterminal.com/docs/catalog/chains/index.md) covers the list of chains we track.

## Tables

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

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

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

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

`events` reaches back to 2021-01, while `blocks` and `transactions` begin on 2024-04-16.

## Sample queries

**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
```

**Priced tokens**

**List the Stacks tokens that had 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
```


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