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

# Raw

> The standardized Solana blocks, transactions, instructions, account activity and rewards.

The `solana` dataset holds the standardized Solana tables. A Solana transaction is a list of instructions run in order, and it has to name up front every account it will touch. The tables follow that shape. `blocks` summarizes each slot, which is Solana's word for a block. `transactions` holds one row per transaction. `instructions` breaks each transaction into its individual instructions, one per row. `account_activity` shows what each account held before and after. `rewards` holds the payouts to validators and stakers. Transactions and instructions that failed sit apart, in `failed_transactions` and `failed_instructions`, in the same shape as the two tables they mirror.

Two Solana words show up throughout. A **program** is what other chains call a smart contract. An **account** is a slot of storage on the chain, and everything is one: a wallet, a token balance, a program's own code. Amounts below are in lamports, the smallest unit of SOL: one SOL is a billion lamports.

## Tables

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

  <tbody>
    <tr>
      <td><code>blocks</code></td>
      <td>2020-10</td>
      <td>One row per slot, with transaction counts and fee totals.</td>
    </tr>

    <tr>
      <td><code>transactions</code></td>
      <td>2020-10</td>
      <td>One row per transaction, with its fee and signatures.</td>
    </tr>

    <tr>
      <td><code>instructions</code></td>
      <td>2020-10</td>
      <td>One row per executed instruction, inner instructions included.</td>
    </tr>

    <tr>
      <td><code>account\_activity</code></td>
      <td>2020-10</td>
      <td>One row per account a transaction touched, with balances before and after.</td>
    </tr>

    <tr>
      <td><code>rewards</code></td>
      <td>2020-10</td>
      <td>One row per reward credited to an account in a block.</td>
    </tr>

    <tr>
      <td><code>failed\_transactions</code></td>
      <td>2025-01</td>
      <td>Transactions that failed, in the same shape as <code>transactions</code>.</td>
    </tr>

    <tr>
      <td><code>failed\_instructions</code></td>
      <td>2025-01</td>
      <td>Instructions that failed, in the same shape as <code>instructions</code>.</td>
    </tr>
  </tbody>
</table>

`instructions` and `account_activity` are among the largest tables we publish anywhere, so keep the `block_timestamp` range narrow and filter on `executing_account` or `account_key` as early in the query as you can.

<Tabs>
  <Tab title="blocks">
    A slot is Solana's block: one batch of transactions added to the chain. Vote transactions are validators keeping the network in agreement rather than users doing anything, so the counts and fee totals here are split into vote and non-vote. `blocks` contains one row per slot.

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

      <tbody>
        <tr>
          <td><code>block\_slot</code></td>
          <td><code>INT64</code></td>
          <td>The slot number.</td>
        </tr>

        <tr>
          <td><code>block\_hash</code></td>
          <td><code>STRING</code></td>
          <td>The hash of the block.</td>
        </tr>

        <tr>
          <td><code>block\_height</code></td>
          <td><code>INT64</code></td>
          <td>The block height.</td>
        </tr>

        <tr>
          <td><code>block\_timestamp</code></td>
          <td><code>TIMESTAMP</code></td>
          <td>The time the block was produced. Partition column.</td>
        </tr>

        <tr>
          <td><code>parent\_slot</code></td>
          <td><code>INT64</code></td>
          <td>The slot of the parent block.</td>
        </tr>

        <tr>
          <td><code>previous\_block\_hash</code></td>
          <td><code>STRING</code></td>
          <td>The hash of the parent block.</td>
        </tr>

        <tr>
          <td><code>total\_transaction\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of transactions in the block.</td>
        </tr>

        <tr>
          <td><code>successful\_transaction\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of successful transactions.</td>
        </tr>

        <tr>
          <td><code>failed\_transaction\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of failed transactions.</td>
        </tr>

        <tr>
          <td><code>vote\_transaction\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of vote transactions.</td>
        </tr>

        <tr>
          <td><code>non\_vote\_transaction\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of non-vote transactions.</td>
        </tr>

        <tr>
          <td><code>successful\_vote\_transaction\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of successful vote transactions.</td>
        </tr>

        <tr>
          <td><code>successful\_non\_vote\_transaction\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of successful non-vote transactions.</td>
        </tr>

        <tr>
          <td><code>failed\_vote\_transaction\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of failed vote transactions.</td>
        </tr>

        <tr>
          <td><code>failed\_non\_vote\_transaction\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of failed non-vote transactions.</td>
        </tr>

        <tr>
          <td><code>total\_fee</code></td>
          <td><code>INT64</code></td>
          <td>The total fees paid in the block, in lamports.</td>
        </tr>

        <tr>
          <td><code>successful\_vote\_transactions\_fee</code></td>
          <td><code>INT64</code></td>
          <td>The fees paid by successful vote transactions, in lamports.</td>
        </tr>

        <tr>
          <td><code>successful\_non\_vote\_transactions\_fee</code></td>
          <td><code>INT64</code></td>
          <td>The fees paid by successful non-vote transactions, in lamports.</td>
        </tr>

        <tr>
          <td><code>failed\_vote\_transactions\_fee</code></td>
          <td><code>INT64</code></td>
          <td>The fees paid by failed vote transactions, in lamports.</td>
        </tr>

        <tr>
          <td><code>failed\_non\_vote\_transactions\_fee</code></td>
          <td><code>INT64</code></td>
          <td>The fees paid by failed non-vote transactions, in lamports.</td>
        </tr>

        <tr>
          <td><code>successful\_non\_vote\_transactions\_priority\_fee</code></td>
          <td><code>INT64</code></td>
          <td>The priority fees paid by successful non-vote transactions, in lamports.</td>
        </tr>

        <tr>
          <td><code>failed\_non\_vote\_transactions\_priority\_fee</code></td>
          <td><code>INT64</code></td>
          <td>The priority fees paid by failed non-vote transactions, in lamports.</td>
        </tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="transactions">
    A transaction is one signed bundle of instructions, naming every account it will touch. `transactions` contains one row per transaction.

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

      <tbody>
        <tr>
          <td><code>block\_timestamp</code></td>
          <td><code>TIMESTAMP</code></td>
          <td>The time of the block containing the transaction. Partition column.</td>
        </tr>

        <tr>
          <td><code>block\_slot</code></td>
          <td><code>INT64</code></td>
          <td>The slot of the containing block.</td>
        </tr>

        <tr>
          <td><code>transaction\_index</code></td>
          <td><code>INT64</code></td>
          <td>The position of the transaction within the block.</td>
        </tr>

        <tr>
          <td><code>transaction\_id</code></td>
          <td><code>STRING</code></td>
          <td>The first signature of the transaction, the identifier used everywhere else.</td>
        </tr>

        <tr>
          <td><code>account\_keys</code></td>
          <td><code>ARRAY\<STRING></code></td>
          <td>The accounts referenced by the transaction.</td>
        </tr>

        <tr>
          <td><code>executing\_accounts</code></td>
          <td><code>ARRAY\<STRING></code></td>
          <td>The programs invoked by the transaction.</td>
        </tr>

        <tr>
          <td><code>fee</code></td>
          <td><code>INT64</code></td>
          <td>The fee paid, in lamports.</td>
        </tr>

        <tr>
          <td><code>signatures</code></td>
          <td><code>ARRAY\<STRING></code></td>
          <td>All signatures on the transaction.</td>
        </tr>

        <tr>
          <td><code>return\_data</code></td>
          <td><code>STRUCT</code></td>
          <td>The program return data: program id and data.</td>
        </tr>

        <tr>
          <td><code>compute\_units\_consumed</code></td>
          <td><code>INT64</code></td>
          <td>The compute units consumed.</td>
        </tr>

        <tr>
          <td><code>required\_signatures\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of required signatures.</td>
        </tr>

        <tr>
          <td><code>readonly\_signed\_accounts\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of read-only signed accounts.</td>
        </tr>

        <tr>
          <td><code>readonly\_unsigned\_accounts\_count</code></td>
          <td><code>INT64</code></td>
          <td>The number of read-only unsigned accounts.</td>
        </tr>

        <tr>
          <td><code>log\_messages</code></td>
          <td><code>ARRAY\<STRING></code></td>
          <td>The program log messages.</td>
        </tr>

        <tr>
          <td><code>signer</code></td>
          <td><code>STRING</code></td>
          <td>The fee-paying signer.</td>
        </tr>

        <tr>
          <td><code>version</code></td>
          <td><code>STRING</code></td>
          <td>The transaction version.</td>
        </tr>

        <tr>
          <td><code>logs\_truncated</code></td>
          <td><code>BOOL</code></td>
          <td>Whether the log output was truncated by the node.</td>
        </tr>

        <tr>
          <td><code>success</code></td>
          <td><code>BOOL</code></td>
          <td>Whether the transaction succeeded.</td>
        </tr>

        <tr>
          <td><code>error</code></td>
          <td><code>STRING</code></td>
          <td>The error raised, when the transaction failed.</td>
        </tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="instructions">
    An instruction is one call into a program, the unit of work inside a transaction. A transaction runs its instructions in order, and a program can make further calls of its own: those are the inner instructions. `instructions` contains one row per executed instruction, inner instructions included.

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

      <tbody>
        <tr>
          <td><code>block\_slot</code></td>
          <td><code>INT64</code></td>
          <td>The slot of the containing block.</td>
        </tr>

        <tr>
          <td><code>block\_timestamp</code></td>
          <td><code>TIMESTAMP</code></td>
          <td>The time of the containing block. Partition column.</td>
        </tr>

        <tr>
          <td><code>transaction\_id</code></td>
          <td><code>STRING</code></td>
          <td>The identifier of the containing transaction.</td>
        </tr>

        <tr>
          <td><code>transaction\_index</code></td>
          <td><code>INT64</code></td>
          <td>The position of the transaction within the block.</td>
        </tr>

        <tr>
          <td><code>transaction\_signer</code></td>
          <td><code>STRING</code></td>
          <td>The fee-paying signer of the transaction.</td>
        </tr>

        <tr>
          <td><code>instruction\_index</code></td>
          <td><code>INT64</code></td>
          <td>The position of the instruction within the transaction.</td>
        </tr>

        <tr>
          <td><code>outer\_instruction\_index</code></td>
          <td><code>INT64</code></td>
          <td>The index of the enclosing top-level instruction, for inner instructions.</td>
        </tr>

        <tr>
          <td><code>executing\_account</code></td>
          <td><code>STRING</code></td>
          <td>The program executing the instruction.</td>
        </tr>

        <tr>
          <td><code>outer\_executing\_account</code></td>
          <td><code>STRING</code></td>
          <td>The program executing the enclosing instruction.</td>
        </tr>

        <tr>
          <td><code>account\_arguments</code></td>
          <td><code>ARRAY\<STRING></code></td>
          <td>The accounts passed to the instruction.</td>
        </tr>

        <tr>
          <td><code>instruction\_data</code></td>
          <td><code>STRING</code></td>
          <td>The instruction payload.</td>
        </tr>

        <tr>
          <td><code>stack\_height</code></td>
          <td><code>INT64</code></td>
          <td>The invocation depth of the instruction.</td>
        </tr>

        <tr>
          <td><code>surrogate\_key</code></td>
          <td><code>STRING</code></td>
          <td>A unique identifier we build for the row, because the chain gives an instruction none of its own.</td>
        </tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="account_activity">
    `account_activity` contains one row per account a transaction touched, showing what it held before the transaction and after it: SOL for every account, plus the token amount for accounts that hold a token. This is where you see who gained and who lost.

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

      <tbody>
        <tr>
          <td><code>block\_timestamp</code></td>
          <td><code>TIMESTAMP</code></td>
          <td>The time of the containing block. Partition column.</td>
        </tr>

        <tr>
          <td><code>block\_slot</code></td>
          <td><code>INT64</code></td>
          <td>The slot of the containing block.</td>
        </tr>

        <tr>
          <td><code>transaction\_index</code></td>
          <td><code>INT64</code></td>
          <td>The position of the transaction within the block.</td>
        </tr>

        <tr>
          <td><code>transaction\_id</code></td>
          <td><code>STRING</code></td>
          <td>The identifier of the containing transaction.</td>
        </tr>

        <tr>
          <td><code>signer</code></td>
          <td><code>STRING</code></td>
          <td>The fee-paying signer of the transaction.</td>
        </tr>

        <tr>
          <td><code>account\_key</code></td>
          <td><code>STRING</code></td>
          <td>The account touched.</td>
        </tr>

        <tr>
          <td><code>account\_index</code></td>
          <td><code>INT64</code></td>
          <td>The position of the account in the transaction's account list.</td>
        </tr>

        <tr>
          <td><code>pre\_balance</code></td>
          <td><code>INT64</code></td>
          <td>The native balance before the transaction, in lamports.</td>
        </tr>

        <tr>
          <td><code>post\_balance</code></td>
          <td><code>INT64</code></td>
          <td>The native balance after the transaction, in lamports.</td>
        </tr>

        <tr>
          <td><code>pre\_token\_amount</code></td>
          <td><code>FLOAT64</code></td>
          <td>The token balance before the transaction, for token accounts.</td>
        </tr>

        <tr>
          <td><code>pre\_token\_mint</code></td>
          <td><code>STRING</code></td>
          <td>The mint of the token balance before the transaction.</td>
        </tr>

        <tr>
          <td><code>pre\_token\_owner</code></td>
          <td><code>STRING</code></td>
          <td>The owner of the token account before the transaction.</td>
        </tr>

        <tr>
          <td><code>pre\_token\_program</code></td>
          <td><code>STRING</code></td>
          <td>The token program of the account before the transaction.</td>
        </tr>

        <tr>
          <td><code>post\_token\_amount</code></td>
          <td><code>FLOAT64</code></td>
          <td>The token balance after the transaction, for token accounts.</td>
        </tr>

        <tr>
          <td><code>post\_token\_mint</code></td>
          <td><code>STRING</code></td>
          <td>The mint of the token balance after the transaction.</td>
        </tr>

        <tr>
          <td><code>post\_token\_owner</code></td>
          <td><code>STRING</code></td>
          <td>The owner of the token account after the transaction.</td>
        </tr>

        <tr>
          <td><code>post\_token\_program</code></td>
          <td><code>STRING</code></td>
          <td>The token program of the account after the transaction.</td>
        </tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="rewards">
    A reward is a payout the chain credits to an account: for staking, for voting, or as a rent refund. `rewards` contains one row per reward credited in a block.

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

      <tbody>
        <tr>
          <td><code>block\_slot</code></td>
          <td><code>INT64</code></td>
          <td>The slot of the block crediting the reward.</td>
        </tr>

        <tr>
          <td><code>block\_hash</code></td>
          <td><code>STRING</code></td>
          <td>The hash of the block.</td>
        </tr>

        <tr>
          <td><code>block\_timestamp</code></td>
          <td><code>TIMESTAMP</code></td>
          <td>The time of the block. Partition column.</td>
        </tr>

        <tr>
          <td><code>pubkey</code></td>
          <td><code>STRING</code></td>
          <td>The account credited.</td>
        </tr>

        <tr>
          <td><code>lamports</code></td>
          <td><code>NUMERIC</code></td>
          <td>The reward amount, in lamports.</td>
        </tr>

        <tr>
          <td><code>commission</code></td>
          <td><code>NUMERIC</code></td>
          <td>The validator commission applied.</td>
        </tr>

        <tr>
          <td><code>post\_balance</code></td>
          <td><code>NUMERIC</code></td>
          <td>The account balance after the reward, in lamports.</td>
        </tr>

        <tr>
          <td><code>reward\_type</code></td>
          <td><code>STRING</code></td>
          <td>The reward type, such as fee, rent, staking or voting.</td>
        </tr>

        <tr>
          <td><code>commission\_bps</code></td>
          <td><code>INT64</code></td>
          <td>The validator commission in basis points.</td>
        </tr>
      </tbody>
    </table>
  </Tab>
</Tabs>

## Sample queries

<Warning>
  Every table splits by day on `block_timestamp`. Bound that column in every query; without a bound the query reads the whole table. `instructions` clusters on `executing_account`, `account_activity` on `account_key` and `transaction_id`, and `rewards` on `pubkey`, so naming one of those beside the date bound is what keeps a read on the two biggest tables small.
</Warning>

<Tabs>
  <Tab title="Daily fees">
    **Sum daily non-vote transactions and total fees over one week.** Vote transactions are validators keeping the network in agreement, so `non_vote_transaction_count` is the figure closest to user activity; `total_fee` is in lamports and covers both kinds.

    ```sql theme={null}
    select
        timestamp_trunc(block_timestamp, day) as day,
        sum(non_vote_transaction_count) as non_vote_transactions,
        sum(total_fee) as total_fee_lamports
    from `solana.blocks`
    where block_timestamp >= timestamp('2026-08-16')
      and block_timestamp < timestamp('2026-08-23')
    group by day
    order by day
    ```
  </Tab>

  <Tab title="One program's day">
    **Measure how much work one program did on one day.** The program is Orca's Whirlpools, and `executing_account` is both the program that ran the instruction and the cluster key, so this reads a slice of the day rather than all of it. Inner instructions are counted here too, which is why the instruction count runs ahead of the transaction count.

    ```sql theme={null}
    select
        count(*) as instructions,
        count(distinct transaction_id) as transactions,
        count(distinct transaction_signer) as signers
    from `solana.instructions`
    where block_timestamp >= timestamp('2026-08-20')
      and block_timestamp < timestamp('2026-08-21')
      and executing_account = 'whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc'
    ```
  </Tab>

  <Tab title="One account's balance moves">
    **Follow the SOL moving in and out of one account across a day.** `account_key` is the cluster key, so naming the account holds the read down. The balances are lamports before and after each transaction, and their difference is what that transaction did to the account.

    ```sql theme={null}
    select
        block_timestamp,
        transaction_id,
        (post_balance - pre_balance) / 1e9 as sol_change
    from `solana.account_activity`
    where block_timestamp >= timestamp('2026-08-20')
      and block_timestamp < timestamp('2026-08-21')
      and account_key = 'CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C'
    order by block_timestamp
    limit 100
    ```
  </Tab>

  <Tab title="Daily rewards by type">
    **Split a week of rewards by what the chain paid them for.** `reward_type` separates staking from voting, fees and rent refunds, and `lamports` divided by a billion gives SOL.

    ```sql theme={null}
    select
        timestamp_trunc(block_timestamp, day) as day,
        reward_type,
        count(*) as rewards,
        sum(lamports) / 1e9 as sol
    from `solana.rewards`
    where block_timestamp >= timestamp('2026-08-16')
      and block_timestamp < timestamp('2026-08-23')
    group by day, reward_type
    order by day, reward_type
    ```
  </Tab>
</Tabs>
