2

Is there an api where I can query if an address contains an erc20 token? I need it returned in JSON format.

1 Answer 1

1

Slightly different to what you asked... (in that in the below we're querying an ERC-20 token contract to see if it contains a balance for a specific address).

The following API will allow you to query an ERC-20 token contract (at a given address) for the balance associated with a particular account address.

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

https://api.etherscan.io/api?module=account&action=tokenbalance&contractaddress=<contract_address>&address=<address_to_query>&tag=latest&apikey=YourApiKeyToken

(It works without specifying an API key, but might be rate limited.)

Your Answer

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

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