1

How to check Ethereum address balance without connecting to an Ethereum node using Python? Should I create or download somewhere some kind of database of ETH addresses to solve this problem?

  • Does this answer your question? [How do I get the balance of an account in Ethereum?](https://stackoverflow.com/questions/32312884/how-do-i-get-the-balance-of-an-account-in-ethereum) – kpie Jan 19 '22 at 21:07
  • @kpie, I know about this method but it is not usable in my case because web3 needs to be connected to an ethereum node. – Positron NN Jan 20 '22 at 10:02

2 Answers2

0

To check the current balance you need to connect to Ethereum. However, you don't need to set up your own Ethereium node, you can use some Ethereum API, e.g.

Rafał Leszko
  • 4,939
  • 10
  • 19
0

Because ethereum addresse balances can change over time, it is impossible to simply download a file that contain a mapping of every address to their balance.

Because only nodes can read data and interact with the ethereum blockchain, one of the ways to get access to access to the addresses and their balances is to connect to a node using the Json Rpc API. Some librairies like Web3.py can help you interact more easily with the nodes.

If you only need the balance of some addresses this might be overkill. Many web APIs can help you fetch data from the blockchain without directly interacting with a node. Etherscan offers an easy to use api that could fit your needs. The endpoint for doing what you want to to is free. Take a look at it.

Xavier Hamel
  • 546
  • 1
  • 9