Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get token eth balance python

from web3 import Web3

token = web3.eth.contract(address={token address}, abi={token abi}) # declaring the token contract
token_balance = token.functions.balanceOf({your address}).call() # returns int with balance, without decimals
 
PREVIOUS NEXT
Tagged: #token #eth #balance #python
ADD COMMENT
Topic
Name
3+9 =