I write "eth" in the terminal , then run it . Then I write in my django code.

web3 = Web3(HTTPProvider('http://localhost:8545'))
web3 = Web3(IPCProvider())

web3.eth.getBalance('0x923eb8ac53073E9Eee5376290c2dF47451828F61')//valid address

But it returns 0 . But this address have balance 0.001 . Now what am I doing wrong here? Why is it not connected to the live server ?


You may first connect to live network with RPC enabled on port 8545 by running the geth --rpc command in the CLI.

Then you can connect to your node via Web3(HTTPProvider('http://localhost:8545')).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.