ERC20 Credit Debit

Credit and debit entries of all addresses for every ERC20 token transfer.

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.

The ERC20 credit debit table allows you to easily track the inflows and outflows of every ERC20 token belonging to all addresses.

Sample Query

Getting the ERC20 Credit Debit of USDC tokens of an address.

This will provide an overview of all the in and outflows of an ERC20 token of interest to a wallet.

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

Table Columns

Column NameDescriptionExample

address

Address of the account that was credited or debited value amount of ERC20 token

0xd387a6e4e84a6c86bd90c158c6028a58cc8ac459

counterparty_address

The address of counter party of this credit or debit transfer.

0x55fe002aeff02f77364de339a1292923a15844b8

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

raw_amount

Amount of tokens moved (unnormalized).

49995000000

raw_amount_str

Amount of tokens moved (unnormalized) in string.

49995000000

amount

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

49995

amount_str

Amount of tokens moved, normalized in string.

49995

usd_value

The amount of tokens moved, in $USD.

49980.0015

usd_exchange_rate

This is the price of a single token, in $USD. Refer to Hourly Token Prices for more information.

0.9997

transaction_hash

Transaction hash that this transfer belongs to.

0xcb1368a1121566799c15a1c80b0a80f2b5022b961399cc1bb7fb24321cfc1b25

log_index

The log index that corresponds to this transfer.

89

block_timestamp

The timestamp of the block that the corresponding transaction of this transfer belongs to. This is also the timestamp when this transfer occurred.

2022-01-28T15:17:56

block_number

The block number that the corresponding transaction of this transfer belongs to.

14094940

block_hash

The block hash that the corresponding transaction of this transfer belongs to.

0x3aabbdb1d24d525053ecd3bc4a68828ab2e601cf803bef2fef824576f488e802

unique_id

Unique id generated to each transfer. Includes transaction hash, log index and credit and debit transaction type.

0xcb1368a1121566799c15a1c80b0a80f2b5022b961399cc1bb7fb24321cfc1b25_log_index-89_credit

Last updated