Skip to main content

Setup

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

Notes

  • Usage is billed in compute units per call (listed per endpoint); throughput is capped per plan.
  • Token, transfer and NFT calls go to the network set in ALCHEMY_NETWORK; not every API runs on every network.
  • JSON-RPC calls (token and transfer) answer with result or error inside a 200; check error.
  • The Prices API is not in this entry: it takes the key in the URL path (/prices/v1/{apiKey}/…), and this entry sends the key only in the Authorization header.

Endpoints

Get an address’s ERC-20 balances

  • A read sent as a JSON-RPC POST.
  • 20 compute units.
  • tokenBalance is a hex string in the token’s smallest unit; get decimals from alchemy.token.metadata.

Get ERC-20 token metadata

  • A read sent as a JSON-RPC POST.
  • 10 compute units.

List asset transfers

  • A read sent as a JSON-RPC POST.
  • Blocks and maxCount are hex strings; maxCount defaults to 0x3e8 (1000) per page; pass the returned pageKey for the next.
  • internal transfers exist only on Ethereum, Polygon, Base and Arc mainnets; withMetadata (block timestamps) only on ETH, Base, Polygon, Arbitrum and Optimism.
  • value is null for ERC-721 transfers and tokens of unknown decimals; rawContract carries the raw amount.

List NFTs owned by an address

List the NFTs in a contract

  • Page with startToken: pass the pageKey from the previous response as startToken.

Get one NFT’s metadata

Get an NFT collection’s metadata

List an NFT collection’s owners