The assets.erc20_balances_latest table contains the current ERC20 balances of all addresses. It is otherwise identical to ERC20 Balances.

Note that the USD prices of any given latest balance might lag more than you expect them to. Check the _updated_at__usd_exchange_rate_current column to ensure the price is fresh enough for your use case.

Sample Query

Getting the latest ERC20 Balances of USDC Token from an address.

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