7

I would like a RESTful API for viewing all addresses which holds a balance of a specific contract.

It seems that etherscan.io deprecated this feature, or I'm looking at the wrong endpoints

Are there any services that do this? Other block explorers with APIs?

1
  • What do you mean by 'holding balance of a specific contract" ? Is this about holding tokens from an ERC20 contract ? Commented Jul 19, 2018 at 20:25

1 Answer 1

0

This endpoint by Amberdata.io would do the trick!

Request:

curl --request GET \
  --url 'https://web3api.io/api/v1/tokens/0x06012c8cf97bead5deae237070f9587f8e7a266d/holders/latest' \
  --header 'x-api-key: <x-api_key>'

Response:

{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": [
    {
      "tokenAddress": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
      "holderAddress": "0xb1690c08e213a35ed9bab7b318de14420fb57d8c",
      "timestamp": 1554161757000,
      "holderFirstTimestamp": "2017-11-23T18:44:21.000Z",
      "numTokens": "215378"
    },
    {
      "tokenAddress": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
      "holderAddress": "0x68b42e44079d1d0a4a037e8c6ecd62c48967e69f",
      "timestamp": 1554156091000,
      "holderFirstTimestamp": "2018-03-06T19:03:17.000Z",
      "numTokens": "171892"
    },
    ...
  ]
}

It returns a list of every address that holds that token. In this case every address that has Cryptokitties.

Hope that helps! 😄

1
  • for the low low price of $796 per month! no it doesn't help. Ended up parsing all addresses that transact to and from a token contract from the block height it was created. Not a real solution for casual use.
    – CQM
    Commented Apr 2, 2019 at 1:59

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.