Skip to main content

Setup

Put them in your environment or .env; Data APIs covers the other ways.

Notes

  • Every call is GET /v2/api with chainid, module and action; each endpoint here fixes module and action, and chainid picks the chain.
  • Free plan: 3 calls/second and 100,000 calls/day on the free-tier chains only (Base, BNB Chain, OP, Avalanche and others need a paid plan). Calls past the daily cap are blocked until it resets.
  • Endpoints marked PRO need the Standard plan or above.
  • status ‘0’ means an error or simply no records; read message and result.
  • Amounts are integer strings in the smallest unit: wei for native balances, 10^decimals for tokens.

Endpoints

Get an address’s native balance

  • Result is a string in wei; divide by 10^18.

Get native balances of several addresses

  • Balances are strings in wei.

List an address’s transactions

  • value and gasPrice are wei strings; timeStamp is Unix seconds.
  • Page with page and offset; narrow with startblock/endblock for long histories.

List an address’s internal transactions

  • value is a wei string.

List ERC-20 token transfers

  • value is in the token’s smallest unit; divide by 10^tokenDecimal (returned on each row).

List ERC-721 (NFT) transfers

List an address’s ERC-20 holdings

  • PRO endpoint: Standard plan or above.
  • Balances are in each token’s smallest unit; divide by 10^TokenDivisor.

Get token project info

  • PRO endpoint: Standard plan or above.

List a token’s holders

  • PRO endpoint: Standard plan or above.
  • Quantities are in the token’s smallest unit.

Get an ERC-20 token’s total supply

  • Result is in the token’s smallest unit; divide by 10^decimals.

Get a verified contract’s source code

  • Available on every chain and every plan, the free tier included.

Get a verified contract’s ABI

  • result is the ABI as a JSON-encoded string: parse it again.

Get event logs of an address

Find the block at a timestamp

Get gas price recommendations

  • Prices are in gwei.

Get the native token’s last price