0

Is there any API for ERC20 token balance of an address for a particular contract?

1

From https://etherscan.io/apis#tokens:

Get ERC20-Token Account Balance for TokenContractAddress https://api.etherscan.io/api?module=account&action=tokenbalance&contractaddress=0x57d90b64a1a57749b0f932f1a3395792e12e7055&address=0xe04f27eb70e025b78871a2ad7eabe85e61212761&tag=latest&apikey=YourApiKeyToken

0

For mainnet:

https://api.etherscan.io/api?module=account&action=balance&address=YourContractOrAccountAddress&tag=latest&apikey=YourApiKeyToken

For testnet:

https://api-<testnet>.etherscan.io/api?module=account&action=balance&address=YourContractOrAccountAddress&tag=latest&apikey=YourApiKeyToken

You can generate an API key at https://etherscan.io/myapikey.

See https://etherscan.io/apis for more details.

  • I believe these URLs will give ether balances, not ERC20 token balances. – user19510 Jan 4 at 8:42
  • It is giving Ether balance not ERC20 token balance – Muhzin Jan 4 at 8:58
  • I think, API key is not mandatory to provide – R Sun Sep 9 at 9:00
0

Cindercloud has an API for this. For a full historic data API, consider contacting Arkane Network

0

I found this one API which is ideal to fetch any kind of balance queries (be it ERC20 Token or ETH) on any address (be it Account or Contract). There's only one limitation however, there's an API limit of 1 hit in every 2 seconds. Check this: https://github.com/EverexIO/Ethplorer/wiki/Ethplorer-API#methods

Let me know if it helps.

0

If you are looking for an API to check balances of any ERC20 token, get info on any ERC20 token, send tokens automated etc., you can use Tokengateway. It is scalable and does not have limits like etherscan in the paid versions.

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.