We're now supporting Polygon zkEVM!
Learn more here.

Contents

eth_getBalance RPC Method

The API credit value for this method is 2 . To learn more about API credits and each method's value, visit the API Credits page.

Parameters:

  1. address - string - The address (20 bytes) to check for balance
  2. blockNumber/tag - string - The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation

Returns:

  1. result - The ETH balance of the specified address in hexadecimal value, measured in wei

Code Examples:

const ethers = require("ethers");
(async () => {
  const provider = new ethers.providers.JsonRpcProvider("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/");
  const balance = await provider.getBalance(
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  );
  console.log(balance);
})();
Ready to get started? Create a free account