0

Having this address: https://etherscan.io/address/0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8

The balance on the web is 21.76252288478066826 Ether

But using the API the balance is: https://ropsten.etherscan.io/api?apikey=GY9KKYEJF1HDEPIAIRGA66R2RIQWQXV9UZ&module=account&action=balance&address=0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8&tag=latest

5000014636180791194320764

I don't even know what unit is that. Because the documentation don't say anything.

1 Answer 1

2

You are looking at two different networks. The first is on Mainnet, the second is on Ropsten (test network).

If you query the account via the Mainnet API, https://api.etherscan.io/api?module=account&action=balance&address=0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8&tag=latest then you get

{"status":"1","message":"OK","result":"21767542884780668260"}

Units are Wei = 10^-18 Ether. So this is 21.767542884780668260 Eth.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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