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