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

# Balance Snapshots 🌱

### Table Details

| Property            | Value                                   |
| ------------------- | --------------------------------------- |
| Table Name          | `stellar_testnet.raw.balance_snapshots` |
| Table Status        | Beta 🌱                                 |
| Unique Key          | `ledger_close_time`, `unique_id`        |
| Clustering Key(s)   | `to_date("ledger_close_time")`          |
| Search Optimization | `account_id`, `asset_id`                |

### Table Columns

| Column Name                        | Data Type         | Description                                                                            |
| ---------------------------------- | ----------------- | -------------------------------------------------------------------------------------- |
| account\_id                        | VARCHAR(16777216) | The Stellar account address (G...) holding the balance, or null for contract balances. |
| asset\_type                        | VARCHAR(16777216) | Type of asset (native, credit\_alphanum4, credit\_alphanum12, contract).               |
| asset\_id                          | VARCHAR(16777216) | Unique identifier of the asset (asset code:issuer, or contract id).                    |
| asset\_code                        | VARCHAR(16777216) | Code of the credit asset (e.g. "USDC"), null for native XLM.                           |
| asset\_issuer                      | VARCHAR(16777216) | Address of the asset's issuer account, null for native XLM.                            |
| token\_id                          | NUMBER(38,0)      | Contract address (C...) if the balance is for a Soroban token, null otherwise.         |
| raw\_balance\_str                  | VARCHAR(16777216) | Balance as a string (preserves precision for large numbers).                           |
| raw\_balance                       | NUMBER(38,0)      | Balance as a numeric value (in stroops for native; smallest unit for credit assets).   |
| raw\_minimum\_balance              | NUMBER(38,0)      | Minimum required balance for the account (reserves + selling liabilities).             |
| raw\_available\_balance            | NUMBER(38,0)      | Balance available for use (raw\_balance minus minimum and selling liabilities).        |
| raw\_liabilities\_selling          | NUMBER(38,0)      | Selling liabilities held against this balance from open offers.                        |
| raw\_liabilities\_buying           | NUMBER(38,0)      | Buying liabilities held against this balance from open offers.                         |
| raw\_pre\_balance\_str             | VARCHAR(16777216) | Previous balance as a string before this change.                                       |
| raw\_pre\_balance                  | NUMBER(38,0)      | Previous balance as a numeric value before this change.                                |
| last\_modified\_ledger\_sequence   | NUMBER(38,0)      | Ledger sequence at which this entry was last modified.                                 |
| ledger\_close\_time                | TIMESTAMP\_NTZ(9) | Time the ledger that produced this snapshot was closed (Unix timestamp).               |
| ledger\_hash                       | VARCHAR(16777216) | Hash of the ledger that produced this snapshot.                                        |
| ledger\_sequence                   | NUMBER(38,0)      | Sequence number of the ledger that produced this snapshot.                             |
| transaction\_hash                  | VARCHAR(16777216) | Hash of the transaction that produced this snapshot, if any.                           |
| transaction\_index                 | NUMBER(38,0)      | Position of the transaction within its ledger.                                         |
| ledger\_entry\_change\_index       | NUMBER(38,0)      | Position of this change within the ledger entry change list.                           |
| ledger\_entry\_type                | VARCHAR(16777216) | Numeric type of the ledger entry (account, trustline, contract\_data, etc.).           |
| ledger\_entry\_type\_str           | VARCHAR(16777216) | String name of the ledger entry type.                                                  |
| ledger\_entry\_change\_type        | VARCHAR(16777216) | Numeric type of change (created, updated, removed, state).                             |
| ledger\_entry\_change\_reason\_str | VARCHAR(16777216) | Human-readable reason for the change (operation, fee, etc.).                           |
| ledger\_entry\_change\_reason      | VARCHAR(16777216) | Numeric reason code for the change.                                                    |
| post\_ledger\_entry                | VARIANT           | The full ledger entry after the change, as JSON.                                       |
| pre\_ledger\_entry                 | VARIANT           | The full ledger entry before the change, as JSON.                                      |
| \_extra\_fields                    | VARIANT           | Additional fields not normalised into named columns, as JSON.                          |
| unique\_id                         | VARCHAR(16777216) | A synthetic primary key for this snapshot row.                                         |
| \_created\_at                      | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was created in the database.                               |
| \_updated\_at                      | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was last updated in the database.                          |
