> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# ERC20 Balances

> Historical ERC20 balances of all addresses at every block height.

<Info>
  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.
</Info>

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.

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

### Table Columns

<table><thead><tr><th>Column Name</th><th>Description</th><th>Example</th><th data-hidden>Column Name</th></tr></thead><tbody><tr><td>address</td><td>Address of the account.</td><td><code>0xd387a6e4e84a6c86bd90c158c6028a58cc8ac459</code></td><td /></tr><tr><td>token\_address</td><td>Token address of the ERC20 token.</td><td><code>0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48</code></td><td /></tr><tr><td>token\_name</td><td> Name of the ERC20 token.</td><td><code>USD Coin</code></td><td /></tr><tr><td>token\_symbol</td><td>Token symbol of this token.</td><td><code>USDC</code></td><td /></tr><tr><td>balance</td><td>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 <code>raw\_balance</code> divided by 10^6.</td><td><code>10</code></td><td /></tr><tr><td>raw\_balance</td><td>Balance of tokens (unnormalized)</td><td><code>10000000</code></td><td /></tr><tr><td>usd\_amount</td><td>The amount of tokens, in \$USD.</td><td><code>10</code></td><td /></tr><tr><td>usd\_exchange\_rate</td><td>The exchange rate used to calculate the <code>usd\_value</code>.</td><td><code>1</code></td><td /></tr><tr><td>block\_timestamp</td><td>The timestamp of the block that that resulted in the <code>balance</code>.</td><td><code>2022-09-15 13:51:47</code></td><td /></tr><tr><td>block\_number</td><td>The number of the block that resulted in the <code>balance</code>.</td><td><code>15539508</code></td><td /></tr><tr><td>block\_hash</td><td>The hash of the block that resulted in the <code>balance</code>.</td><td><code>0x25680259dfb40b4ee724ae22fda01a34e6d598c5f2fc25b6d871cb56c488de70</code></td><td /></tr></tbody></table>
