ERC20 Balances

Historical ERC20 balances of all addresses at every block height.

We only use CEX USD prices to estimate the usd_amount. This has the benefit of excluding scam tokens, but some defi tokens might not be covered.

ERC20 balances table contains the ERC20 balances of all addresses, at every block height. Use this table to easily plot the change in the balance of ERC20 tokens for an address or a group of addresses over time.

Sample Query

Getting the ERC20 Balances of USDC Token from an address over time.

select * from ethereum.assets.erc20_balances
where address = '0xd387a6e4e84a6c86bd90c158c6028a58cc8ac459' -- Pranksy
and token_address = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' -- USDC Token Address
order by block_number desc 

Table Columns

Column NameDescriptionExample

address

Address of the account.

0xd387a6e4e84a6c86bd90c158c6028a58cc8ac459

token_address

Token address of the ERC20 token.

0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

token_name

Name of the ERC20 token.

USD Coin

token_symbol

Token symbol of this token.

USDC

balance

Balance of this ERC20 token, normalized by the decimal points defined in the ERC20 token contract. For example, USDC has 6 decimals, so this value is the raw_balance divided by 10^6.

10

raw_balance

Balance of tokens (unnormalized)

10000000

usd_amount

The amount of tokens, in $USD.

10

usd_exchange_rate

The exchange rate used to calculate the usd_value.

1

block_timestamp

The timestamp of the block that that resulted in the balance.

2022-09-15 13:51:47

block_number

The number of the block that resulted in the balance.

15539508

block_hash

The hash of the block that resulted in the balance.

0x25680259dfb40b4ee724ae22fda01a34e6d598c5f2fc25b6d871cb56c488de70

Last updated