Skip to content

Instantly share code, notes, and snippets.

@a26nine
Created January 20, 2023 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a26nine/b0f905e7f1aeae6fa4a7ecfaefcb9042 to your computer and use it in GitHub Desktop.
Save a26nine/b0f905e7f1aeae6fa4a7ecfaefcb9042 to your computer and use it in GitHub Desktop.
from web3 import Web3, HTTPProvider
endpoint = 'YOUR_ENDPOINT_URL_HERE'
connection = Web3(HTTPProvider(endpoint))
address = input("Enter ETH wallet address: ")
balance = connection.fromWei(
connection.eth.getBalance(address, 'latest'), 'ether')
print(f"Balance: {balance} ether")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment