🚀 We’re excited to announce our $35m Series A led by Tiger Global: Press Release, Coindesk, Bloomberg, Business Insider & RefreshMiami!

Contents

eth_getBalance RPC method

Parameters:

  1. Address - The address to check for balance.
  2. Quantity or Tag - (optional) Integer block number, or the string 'latest', 'earliest' or 'pending', see the default block parameter.

Returns:

  1. Result - Integer value of current balance in wei encoded as a hexadecimal.

Code Examples:

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/'))
print (w3.eth.get_balance('0x8D97689C9818892B700e27F316cc3E41e17fBeb9', 'latest'))
Ready to try QuickNode? Start your 7-day free trial