Fetch the current balance of erc20 tokens across all addresses.
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.
Getting the latest balance of USDC of a wallet.
Unique Key: unique_id
Column Name | Data Type | Description |
---|---|---|
address | VARCHAR | Address of the account |
token_address | VARCHAR | Address of the token |
token_name | VARCHAR | Name of the token |
token_symbol | VARCHAR | Symbol of the token |
raw_balance | FLOAT | Balance of ERC20 token unnormalized |
raw_balance_str | VARCHAR | Balance of ERC20 token unnormalized in string format |
balance_str | VARCHAR | Balance of ERC20 token in string format |
balance | FLOAT | Balance of ERC20 token normalized |
usd_balance_current | FLOAT | USD balance of ERC20 token at the current timestamp |
usd_balance_at_block_timestamp | FLOAT | USD balance of ERC20 token at the timestamp of the last activity that resulted in balance change |
usd_exchange_rate_current | FLOAT | USD exchange rate of ERC20 token at the current timestamp |
usd_exchange_rate_at_block_timestamp | FLOAT | USD exchange rate of ERC20 token at the timestamp of the last activity that resulted in balance update |
last_activity_block_timestamp | TIMESTAMP_NTZ(9) | The last timestamp of the block that resulted in the balance update |
last_activity_block_number | BIGINT | The last block number that resulted in the balance update |
last_activity_block_hash | VARCHAR | The last hash of the block that resulted in the balance update |
_updated_at__usd_exchange_rate_current | TIMESTAMP_NTZ(9) | Timestamp of the current USD exchange rate |
unique_id | VARCHAR | Unique ID of the balance |
_updated_at | TIMESTAMP_NTZ(9) | Timestamp of the balance update |