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

### Table Details

| Property            | Value                                                     |
| ------------------- | --------------------------------------------------------- |
| Table Name          | `near.raw.balance_changes`                                |
| Table Status        | Production-Ready                                          |
| Unique Key          | `block_timestamp`, `block_height`, `balance_change_index` |
| Clustering Key(s)   | `to_date("block_timestamp")`                              |
| Search Optimization | `account_id`, `block_height`                              |

### Table Columns

| Column Name            | Data Type         | Description                                                                                                                                                             |
| ---------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| block\_hash            | VARCHAR(16777216) | Cryptographic hash of the block header that contains this record. Uniquely identifies a block.                                                                          |
| block\_height          | NUMBER(38,0)      | Number of confirmed blocks between this block and the genesis block (inclusive). Unlike `block_slot`, this only increments for slots that produced a block.             |
| block\_timestamp       | TIMESTAMP\_NTZ(9) | Timestamp (UTC) of the block that contains this record.                                                                                                                 |
| change\_type           | VARCHAR(16777216) | Nature of the balance change                                                                                                                                            |
| cause\_tx\_hash        | VARCHAR(16777216) | Hash of the transaction that caused this balance change or event.                                                                                                       |
| cause\_receipt\_hash   | VARCHAR(16777216) | Hash of the receipt that triggered this balance change.                                                                                                                 |
| cause\_type            | VARCHAR(16777216) | Type of action that caused this balance change (e.g., transaction, receipt, validator\_reward).                                                                         |
| account\_id            | VARCHAR(16777216) | Lighter internal account identifier.                                                                                                                                    |
| amount\_str            | VARCHAR(16777216) | Normalized token amount stored as a string to preserve full precision. Equivalent to `amount` but avoids floating-point truncation for very large or very small values. |
| amount                 | FLOAT             | Token amount normalized by the token's decimal precision (amount\_raw / 10^decimals). This is the human-readable value (e.g. 1.5 USDC rather than 1500000).             |
| code\_hash             | VARCHAR(16777216) | Hash of the smart contract bytecode deployed at this NEAR account.                                                                                                      |
| locked                 | VARCHAR(16777216) | Amount of funds locked in this account or position, not available for withdrawal.                                                                                       |
| storage\_paid\_at      | NUMBER(38,0)      | Block timestamp when storage fees for this account were last paid.                                                                                                      |
| storage\_usage         | NUMBER(38,0)      | Number of bytes of on-chain storage consumed by this NEAR account.                                                                                                      |
| balance\_change\_index | NUMBER(38,0)      | Sequential index of this balance change within the transaction block.                                                                                                   |
| \_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.                                                                                                           |
