> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Solana Token Transfers

> Token transfer events on the Solana blockchain.

export const QueryContainer = ({queryText}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/4233091/7120853?query_text_t6c1ea=${encodeURIComponent(queryText)}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/4233091/7120853?query_text_t6c1ea=${encodeURIComponent(queryText)}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

The `tokens_solana.transfers` table contains token transfer events for tokens on the Solana blockchain indexed by Dune. This dataset encompasses:

* SPL token transfers
* token2022 token transfers
* native SOL transfers (excluding staking-related transfers)

<Info>
  The transfers table aims to capture standard Solana token transfers. Some tokens may use non-standard transfer methods that might not be included.
</Info>

### Utility

The Solana transfers table provides a comprehensive view of token movement on Solana, enabling you to:

* Track token flows between addresses
* Analyze transaction volumes and patterns
* Identify significant token movements
* Monitor exchange and DeFi protocol activity on Solana

The table contains columns for block information, transfer details, token addresses, account addresses, and transaction metadata.

## Table Schema

| Column                    | Type        | Description                                         |
| ------------------------- | ----------- | --------------------------------------------------- |
| `block_time`              | `TIMESTAMP` | Block timestamp                                     |
| `action`                  | `VARCHAR`   | Transfer action type (transfer, mintTo, burn, etc.) |
| `amount`                  | `UINT256`   | Raw transfer amount                                 |
| `from_token_account`      | `VARCHAR`   | Source token account address                        |
| `to_token_account`        | `VARCHAR`   | Destination token account address                   |
| `token_mint_address`      | `VARCHAR`   | Token mint address                                  |
| `symbol`                  | `VARCHAR`   | Token symbol                                        |
| `amount_display`          | `DOUBLE`    | Transfer amount in display units                    |
| `amount_usd`              | `DOUBLE`    | USD value of the transfer                           |
| `from_owner`              | `VARCHAR`   | Owner of the source token account                   |
| `to_owner`                | `VARCHAR`   | Owner of the destination token account              |
| `token_version`           | `VARCHAR`   | Token program version (spl\_token, token2022)       |
| `tx_id`                   | `VARCHAR`   | Transaction ID                                      |
| `tx_signer`               | `VARCHAR`   | Transaction signer                                  |
| `outer_executing_account` | `VARCHAR`   | Outer executing program account                     |
| `block_date`              | `DATE`      | Block date                                          |
| `block_slot`              | `BIGINT`    | Block slot number                                   |
| `tx_index`                | `INTEGER`   | Transaction index within the block                  |
| `outer_instruction_index` | `INTEGER`   | Outer instruction index                             |
| `inner_instruction_index` | `INTEGER`   | Inner instruction index                             |
| `unique_instruction_key`  | `DECIMAL`   | Unique instruction identifier                       |

<TableSample tableSchema="tokens_solana" tableName="transfers" />

## Sample Queries

**Query recent token transfers for a specific address**

This query returns the most recent token transfers (both incoming and outgoing) for a specified address:

```sql theme={null}
SELECT
    block_time,
    action,
    CASE 
        WHEN from_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' THEN 'Outgoing'
        WHEN to_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' THEN 'Incoming'
    END AS direction,
    amount,
    amount_usd,
    token_mint_address,
    token_version
FROM tokens_solana.transfers
WHERE (from_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' OR to_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ')
    AND block_time > now() - interval '30' day
ORDER BY block_time DESC
LIMIT 100
```

<QueryContainer
  queryText="SELECT
block_time,
action,
CASE 
WHEN from_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' THEN 'Outgoing'
WHEN to_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' THEN 'Incoming'
END AS direction,
amount,
amount_usd,
token_mint_address,
token_version
FROM tokens_solana.transfers
WHERE (from_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' OR to_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ')
AND block_time > now() - interval '30' day
ORDER BY block_time DESC
LIMIT 100"
/>
