tron.balances Table: ez_balances_native_daily Type: Base Table
What
This table provides daily native TRX balances for addresses that have had native activity (transfers, fee payments, or internal transactions). Balances are queried at the last block of each day via RPC and enriched with USD prices. TRX uses 6 decimal places (1 TRX = 1,000,000 SUN).Key Use Cases
- Tracking wallet TRX balance changes over time
- Identifying whale accumulation or distribution patterns
- Calculating portfolio valuations at specific dates
- Analyzing address activity in relation to balance changes
Important Relationships
- Join with ez_native_transfers: Use
address = from_addressoraddress = to_addressto correlate balance changes with specific transfers - Filter on block_date: Always include a
block_datefilter for query performance
Commonly-used Fields
block_date: The date for which the balance was recordedaddress: The account address (0x hex format)balance: TRX balance as a floatbalance_usd: USD-denominated balance using end-of-day TRX pricebalance_precise: Exact TRX balance as string for precision
Sample queries
Columns
| Column Name | Data Type | Description |
|---|---|---|
| BLOCK_NUMBER | NUMBER | Sequential counter representing the position of a block in the Tron blockchain since genesis (block 0). Key Facts: Immutable once finalized Primary ordering mechanism for blockchain data Increments by 1 for each new block Encoded in the first bytes of blockhash Usage in Queries: Important: Many early Tron blocks are empty (zero transactions). Expect blocknumber gaps in transaction-based tables. |
| BLOCK_DATE | DATE | The date for which the balance was queried, using the last block of the day. Always filter on this column for query performance. Example: 2024-01-15 |
| ADDRESS | TEXT | The address of the account, in 0x-prefixed hex format (lowercase). Example: ‘0x1234567890123456789012345678901234567890’ |
| DECIMALS | NUMBER | The number of decimal places for TRX (always 6). |
| BALANCE_HEX | TEXT | The raw balance in SUN represented as a hex string, as returned by the RPC. Example: ‘0x3b9aca00’ |
| BALANCE_RAW | NUMBER | The raw balance in SUN (1 TRX = 1,000,000 SUN) as an integer. Example: 1000000000 |
| BALANCE_PRECISE | TEXT | The balance in TRX as a high-precision string (balance_raw / 10^6). Use for exact calculations. Example: ‘1000.000000’ |
| BALANCE | FLOAT | The balance in TRX as a float. Use balance_precise for calculations requiring exact precision. Example: 1000.0 |
| BALANCE_USD | FLOAT | The balance in USD, calculated using the last hourly TRX price of the day. NULL if price data unavailable. Example: 100.0 |
| EZ_BALANCES_NATIVE_DAILY_ID | TEXT | Primary key — unique identifier for each row ensuring data integrity. Format: VARCHAR containing composite key generated using MD5 hash of the relevant columns. Usage: Deduplication in incremental loads Join operations for data quality checks Troubleshooting specific records |
| INSERTED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp when the record was first added to the Flipside database. Format: TIMESTAMP_NTZ Use Cases: Data freshness monitoring Incremental processing markers Debugging data pipeline issues |
| MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp of the most recent update to this record. Format: TIMESTAMP_NTZ Use Cases: Tracking data corrections and reprocessing Monitoring incremental model updates Data quality audits |