ERC20 Transfers
Fetch ERC20 transfers for blocks 21000000
to 21000100
for WBTC
0x2260fac5e5542a773aa44fbcfedf7c193bc2c599
.
curl -s --location --request GET \
"https://app.pangea.foundation/v1/api/erc20/transfers?chains=ETH&from_block=21000000&to_block=21000100&address__in=0x2260fac5e5542a773aa44fbcfedf7c193bc2c599" \
--header "Accept: application/jsonstream" \
--header "Accept-Encoding: gzip" --compressed \
--header "Authorization: Basic $PANGEA_AUTH" | jq
Response
[
...
{
"chain": 1,
"block_number": 21000099,
"block_hash": "0x4334aa15d92a15a71b774326d0df1d0e6d2b661d2ee1a40f04621cf3b3349b13",
"transaction_hash": "0xd85446edc3a134f78416e994fd8726734910926cc828969bdd9d1c1b40ebe3ec",
"transaction_index": 4,
"log_index": 19,
"address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
"name": "Wrapped BTC",
"symbol": "WBTC",
"decimals": 8,
"from": "0xe43ca1dee3f0fc1e2df73a0745674545f11a59f5",
"to": "0x4585fe77225b41b697c938b018e2ac67ac5a20c0",
"value": 0.995,
"timestamp": 1729346735
}
]
Filtering by from
address
We can identify token mint events by fetching ERC20 token transfers where the from
address is 0x0000000000000000000000000000000000000000
.
Values for a zero address includes falsey values:
0x0
0x0000000000000000000000000000000000000000
Fetch ERC20 transfers for blocks 21000000
to 21000100
with from
address 0x0
.
curl -s --location --request GET \
"https://app.pangea.foundation/v1/api/erc20/transfers?chains=ETH&from_block=21000000&to_block=21000100&from__in=0x0" \
--header "Accept: application/jsonstream" \
--header "Accept-Encoding: gzip" --compressed \
--header "Authorization: Basic $PANGEA_AUTH" | jq
Response
[
...
{
"chain": 1,
"block_number": 21000100,
"block_hash": "0x4ca0bd7a1fab8b5da43ebb8c619bae4446759c75f0b80973f5bbaf11436c3010",
"transaction_hash": "0xf7dce4331124e82ae316a418119ca52f92aa570ec06aa09b2a7639e70d09dbba",
"transaction_index": 231,
"log_index": 314,
"address": "0x502ed02100ea8b10f8d7fc14e0f86633ec2ddada",
"name": "🐼",
"symbol": "🐼",
"decimals": 18,
"from": "0x0000000000000000000000000000000000000000",
"to": "0x53e0caf98b93bbc26acf75572379e4e96b962239",
"value": 5000000,
"timestamp": 1729346747
}
]
Filtering by to
address
We can use a similar query on to
address to identify token burn events.
Fetch ERC20 transfers for blocks 21000000
to 21000100
with to
address 0x0
.
curl -s --location --request GET \
"https://app.pangea.foundation/v1/api/erc20/transfers?chains=ETH&from_block=21000000&to_block=21000100&to__in=0x0" \
--header "Accept: application/jsonstream" \
--header "Accept-Encoding: gzip" --compressed \
--header "Authorization: Basic $PANGEA_AUTH" | jq
Response
[
...
{
"chain": 1,
"block_number": 21000099,
"block_hash": "0x4334aa15d92a15a71b774326d0df1d0e6d2b661d2ee1a40f04621cf3b3349b13",
"transaction_hash": "0xbfefd8c032a08048c8e7cb216c9439ed532980452d35eb2c65983acee5c6b12b",
"transaction_index": 183,
"log_index": 366,
"address": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
"name": "Wrapped liquid staked Ether 2.0",
"symbol": "wstETH",
"decimals": 18,
"from": "0x3451b6b219478037a1ac572706627fc2bda1e812",
"to": "0x0000000000000000000000000000000000000000",
"value": 406.0627450650014,
"timestamp": 1729346735
}
]
Query Parameters
v1/api/erc20/transfers
chains
: Filters the data by specific blockchain networks.from_block
: Filters the data by a starting block number.to_block
: Filters the data by an ending block number.address__in
: Filters the data by a list of ERC20 contractaddress
.to__in
: Filters the data by a list ofto
addresses.from__in
: Filters the data by a list offrom
addresses.value__gte
: Filters the data byvalue
using the greater than or equal to operator.value__lte
: Filters the data byvalue
using the less than or equal to operator.