ERC20 Approvals

Fetch ERC20 approvals for blocks 21000000 to 21000100 for WBTC 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/erc20/approvals?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": 21000089,
    "block_hash": "0xc9d7228978bbfc4a314ed1e1b536ec5a7a3ac8f749d4e5238ed6e9de1fbd64d3",
    "transaction_hash": "0xa9d5391d10b8b9a6e2d3bcb28325833a553766831d86dda7f4a408192594b513",
    "transaction_index": 89,
    "log_index": 314,
    "address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
    "name": "Wrapped BTC",
    "symbol": "WBTC",
    "decimals": 8,
    "owner": "0xa58aef2608a4c1d687f2e85a8c45d8fd5c720e37",
    "spender": "0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae",
    "value": 2
  }
]

Query Parameters

v1/api/erc20/approvals

  • 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 contract address.
  • owner__in: Filters the data by a list of ERC20 token owner.
  • spender__in: Filters the data by a list of ERC20 token spender.
  • value__gte: Filters the data by value using the greater than or equal to operator.
  • value__lte: Filters the data by value using the less than or equal to operator.
  • symbol__in: Filters the data by a list of token symbol.
  • name__in: Filters the data by a list of token name.
  • decimals__gte: Filters the data by token decimal using the greater than or equal to operator.
  • decimals__lte: Filters the data by token decimal using the less than or equal to operator.