简体   繁体   中英

How to check Ethereum address balance without connecting to an Ethereum node?

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?

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, eg

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM