The assets.erc20_balances_latest table contains the current balances of erc20 tokens across all addresses.

This table is derived from the assets.erc20_balances table, by selecting the most recent balance update for each unique address-asset combination.

Sample Query

Getting the latest balance of USDC of a wallet.

select * from ethereum.assets.erc20_balances_latest
where address = '0xd387a6e4e84a6c86bd90c158c6028a58cc8ac459' -- Pranksy
and token_address = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' -- USDC Token Address

Table Columns

Unique Key: unique_id

Column NameData TypeDescription
addressVARCHARAddress of the account
token_addressVARCHARAddress of the token
token_nameVARCHARName of the token
token_symbolVARCHARSymbol of the token
raw_balanceFLOATBalance of ERC20 token unnormalized
raw_balance_strVARCHARBalance of ERC20 token unnormalized in string format
balance_strVARCHARBalance of ERC20 token in string format
balanceFLOATBalance of ERC20 token normalized
usd_balance_currentFLOATUSD balance of ERC20 token at the current timestamp
usd_balance_at_block_timestampFLOATUSD balance of ERC20 token at the timestamp of the last activity that resulted in balance change
usd_exchange_rate_currentFLOATUSD exchange rate of ERC20 token at the current timestamp
usd_exchange_rate_at_block_timestampFLOATUSD exchange rate of ERC20 token at the timestamp of the last activity that resulted in balance update
last_activity_block_timestampTIMESTAMP_NTZ(9)The last timestamp of the block that resulted in the balance update
last_activity_block_numberBIGINTThe last block number that resulted in the balance update
last_activity_block_hashVARCHARThe last hash of the block that resulted in the balance update
_updated_at__usd_exchange_rate_currentTIMESTAMP_NTZ(9)Timestamp of the current USD exchange rate
unique_idVARCHARUnique ID of the balance
_updated_atTIMESTAMP_NTZ(9)Timestamp of the balance update