ERC20 Metadata

Block, transaction, and log data corresponds to when the ERC20 token was first indexed by Pangea, not when the contract was first deployed.

Fetch ERC20 metadata for blocks 21000000 to 21010000.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/erc20?chains=ETH&from_block=21000000&to_block=21010000" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 1,
    "first_seen_block_number": 21009996,
    "first_seen_block_hash": "0x6f054522b7ae88d8f82c45413d0e4c544e45fbeeb829c13ba25a1105c433047c",
    "first_seen_transaction_hash": "0x73c0c0145c432b756fa19e432b3c8b85ecf4170b135cf2d50b302c1046692f06",
    "first_seen_transaction_index": 2,
    "first_seen_log_index": 7,
    "address": "0xeca2ffd283841122142c6cdf161149075777fde1",
    "name": "Vitalik's 2017 Git",
    "symbol": "CASPER",
    "decimals": 9
  }
]

Query Parameters

v1/api/erc20

  • 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.
  • 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.