Skip to main content
Schema: 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_address or address = to_address to correlate balance changes with specific transfers
  • Filter on block_date: Always include a block_date filter for query performance

Commonly-used Fields

  • block_date: The date for which the balance was recorded
  • address: The account address (0x hex format)
  • balance: TRX balance as a float
  • balance_usd: USD-denominated balance using end-of-day TRX price
  • balance_precise: Exact TRX balance as string for precision

Sample queries

-- Top TRX holders for a given date
SELECT
    address,
    balance,
    balance_usd
FROM tron.balances.ez_balances_native_daily
WHERE block_date = CURRENT_DATE - 1
ORDER BY balance DESC
LIMIT 100;

-- Balance trend for a specific address
SELECT
    block_date,
    balance,
    balance_usd
FROM tron.balances.ez_balances_native_daily
WHERE address = LOWER('0x...')
    AND block_date >= CURRENT_DATE - 90
ORDER BY block_date;

-- Addresses with largest balance changes
SELECT
    a.address,
    a.balance AS current_balance,
    b.balance AS previous_balance,
    a.balance - b.balance AS balance_change,
    a.balance_usd - b.balance_usd AS usd_change
FROM tron.balances.ez_balances_native_daily a
JOIN tron.balances.ez_balances_native_daily b
    ON a.address = b.address
    AND b.block_date = CURRENT_DATE - 8
WHERE a.block_date = CURRENT_DATE - 1
ORDER BY ABS(a.balance - b.balance) DESC
LIMIT 50;

Columns

Column NameData TypeDescription
BLOCK_NUMBERNUMBERSequential 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_DATEDATEThe 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
ADDRESSTEXTThe address of the account, in 0x-prefixed hex format (lowercase). Example: ‘0x1234567890123456789012345678901234567890’
DECIMALSNUMBERThe number of decimal places for TRX (always 6).
BALANCE_HEXTEXTThe raw balance in SUN represented as a hex string, as returned by the RPC. Example: ‘0x3b9aca00’
BALANCE_RAWNUMBERThe raw balance in SUN (1 TRX = 1,000,000 SUN) as an integer. Example: 1000000000
BALANCE_PRECISETEXTThe balance in TRX as a high-precision string (balance_raw / 10^6). Use for exact calculations. Example: ‘1000.000000’
BALANCEFLOATThe balance in TRX as a float. Use balance_precise for calculations requiring exact precision. Example: 1000.0
BALANCE_USDFLOATThe 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_IDTEXTPrimary 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_TIMESTAMPTIMESTAMP_NTZUTC 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_TIMESTAMPTIMESTAMP_NTZUTC 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