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

# Overview

Allium currently supports Solana data from the Genesis block.

Our Solana data schemas include NFTs, DEXs and assets (transfers/credit debit) data. Support for additional verticals and programs can be made available upon request.

[More about the Solana blockchain.](https://docs.solana.com/)

### Solana Tables

Our Solana data includes the following schemas and tables:

| Schema  | Description                                                                                          | Tables                                                                             |
| ------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| Raw     | Raw blockchain data for Solana.                                                                      | blocks, transactions, instructions, inner\_instructions, rewards                   |
| Decoded | Decoded instructions                                                                                 | instructions                                                                       |
| Assets  | Token transfers and credit debit of spl-tokens and native SOL.                                       | transfers, credit\_debit, spl\_token\_balances, sol\_balances                      |
| NFTs    | NFT trades coverage of major marketplaces and NFT mints data.                                        | trades, mints                                                                      |
| DEXs    | DEX trades and aggregator trades on Solana. Coverage includes 10+ major DEXs and multiple protocols. | trades, aggregator\_trades                                                         |
| DeFi    | DeFi related protocols including loans, rewards and farms                                            | farms, fees\_claimed, lending, lending\_tvl, lending\_tvl\_daily, rewards\_claimed |

### Transaction-level columns

Some of the datasets have a variant suffixed with `_w_tx_cols` (e.g. `solana.assets.transfers_w_tx_cols`). These are views that combine the enriched data (i.e. transfers) with a couple of transaction-level columns which may be useful for certain analyses. The additional columns are:

| Column Name            | Description                                                                                                                                                                                                                                                                                     | Type    | Example                                                                                                                                                                                                                                                                                                                                                                                                 |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| tx\_base\_fee          | the base fee paid for the transaction                                                                                                                                                                                                                                                           | number  | 5000                                                                                                                                                                                                                                                                                                                                                                                                    |
| tx\_priority\_fee      | the priority fee paid for the transaction, if any                                                                                                                                                                                                                                               | number  | 500                                                                                                                                                                                                                                                                                                                                                                                                     |
| tx\_total\_fee         | the total fee paid for the transaction, equivalent to `fee` column in `solana.raw.transactions`                                                                                                                                                                                                 | number  | 5500                                                                                                                                                                                                                                                                                                                                                                                                    |
| tx\_account\_keys      | account keys involved in the transaction, equivalent to `account_keys` column in `solana.raw.transactions`                                                                                                                                                                                      | variant | `[{ "pubkey": "Bp9ok7LoJvBmBfGWEWznL4SD1rMqBQqLzTDbAZVkM92f", "signer": true, "source": "transaction", "writable": true }]`                                                                                                                                                                                                                                                                             |
| tx\_mint\_to\_decimals | a dictionary mapping mint address to mint decimal. parsed from `pre/post_token_balances` in `solana.raw.transactions`                                                                                                                                                                           | variant | `{ "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v": 6, "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB": 6, "So11111111111111111111111111111111111111112": 9 }`                                                                                                                                                                                                                                            |
| tx\_token\_accounts    | a dictionary mapping token accounts to details obtained from `pre/post_token_balances` in `solana.raw.transactions`. `changed_owner` is `true` when the token account appears in both pre & post token balances and has changed. `new_account` is `true` when it appears only in post balances. | variant | `{ "55v6gEq8A342WZSRfycnud9W8fBkKpr6BwnW86GV1YQU": { "changed_owner": false, "decimals": 6, "mint": "jXP7pRyfGgyYhNyu95q1QPWpkMSQ7euBF1ByJJrpump", "new_account": false, "owner": "2ej18rDtQ7nb6BiezjM9vFfotZ7WE6eGKswrWqbWFKCn", "post_amount": "0", "post_owner": "2ej18rDtQ7nb6BiezjM9vFfotZ7WE6eGKswrWqbWFKCn", "pre_amount": "0", "pre_owner": "2ej18rDtQ7nb6BiezjM9vFfotZ7WE6eGKswrWqbWFKCn" } }` |
| tx\_sol\_amounts       | a dictionary mapping accounts to details about their native SOL balance, obtained from `pre/post_balances` in `solana.raw.transactions`                                                                                                                                                         | variant | `{ "24tza9jGvvSwL8HEfkjnrL3vUxBukaF6Uj1ufXTu3Hif": { "post_amount": 2039280, "pre_amount": 2039280 }, "5SEpbdjFK5FxwTvfsGMXVQTD2v4M2c5tyRTxhdsPkgDw": { "post_amount": 81771454520, "pre_amount": 81771454520 } }`                                                                                                                                                                                      |

### Convenience functions

Several [snowflake table functions](https://docs.snowflake.com/en/developer-guide/udf/sql/udf-sql-tabular-functions) are provided for convenient querying of specific use cases:

1. pull solana transactions, instructions, inner\_instructions for activites involving a set of addresses

   This fetches all transactions, instructions, inner instructions for activites involving an address, equivalent to calling `getTransaction` for each txn\_id returned by a `getSignaturesForAddress` rpc call.

   It only includes nonvoting transactions.

   For successful, nonvoting transactions, the contents of instructions are nested in the arrays `instructions` and `inner_instructions`.

   For failed, nonvoting transactions, instructions/inner instructions are not fetched.

   ```sql theme={null}
   select * from
   table(solana.udfs.sql_table_solana_get_transactions_for_address(
       array_construct('C2gyWTyDz6CK822hLvCMKZ5MBQRkEFjcaF8UoERrYAvy'),
       '2025-01-01'::timestampntz,
       '2025-01-05'::timestampntz
       )
   )
   ```

2. pull solana transactions, instructions, inner\_instructions for accounts with balance changes

   ```sql theme={null}
   select * from
   table(solana.udfs.sql_table_solana_get_transactions_from_balances(
       array_construct('C2gyWTyDz6CK822hLvCMKZ5MBQRkEFjcaF8UoERrYAvy'),
       '2025-01-01'::timestampntz,
       '2025-01-05'::timestampntz
       )
   )
   ```

3. pull *non-voting* solana transactions, instructions, inner\_instructions for accounts with balance changes, with transfer info if available
   ```sql theme={null}
   select * from
   table(solana.udfs.sql_table_solana_get_nonvoting_transactions_from_balances_with_transfers(
       array_construct('C2gyWTyDz6CK822hLvCMKZ5MBQRkEFjcaF8UoERrYAvy'),
       '2025-01-01'::timestampntz,
       '2025-01-05'::timestampntz
       )
   )
   ```

4. pull *non-voting* solana sol+spl latest balances as of a certain timestamp
   ```sql theme={null}
   select * from
   table(solana.udfs.sql_table_solana_get_nonvoting_latest_balances_as_of_time(
       array_construct('2QfBNK2WDwSLoUQRb1zAnp3KM12N9hQ8q6ApwUMnWW2T'),
       '2025-07-09 16:05:19'::timestampntz
       )
   )
   ```

5. pull balance changes of an address, with transfer attribution where possible
   ```sql theme={null}
   select * from
   table(solana.udfs.sql_table_solana_get_balance_change_attribution(
       array_construct('GVJp1bkQgw3QdXBmvWRBK5SaXcr3kzf45SfrvRDobQQE'),
       '2025-07-09'::timestampntz,
       '2025-07-10'::timestampntz
       )
   )
   ```

6. pull daily end-of-day balances of a set of addresses in a time range
   ```sql theme={null}
   select * from
   table(solana.udfs.sql_table_solana_get_daily_balances(
       array_construct('GVJp1bkQgw3QdXBmvWRBK5SaXcr3kzf45SfrvRDobQQE'),
       '2025-07-09'::timestampntz,
       '2025-07-10'::timestampntz
       )
   )
   ```
