Links

erc20_tokenHolders

Get a list of account address ranked by balance from high to low.
Through erc20_tokenHolders, you can fetch the data of holders of that token collection, contractAddress is necessary. Statistics like block number, account address and value will be returned. This API enables you to have a deeper dive into the holders' info of the token you want to search for.
Supported on Ethereum and Optimism.

Parameters

Object - An object with the following fields (required):
  • contractAddress(hex string, required) - the contract address for erc20 token.
  • pageSize(integer number, optional, default 20 max 50) - max number of results to return per call.
  • pageIndex(integer number, optional, default 1) - page index.

Returns

Object - An object with the following fields:
  • id(integer number) - json-rpc id.
  • jsonrpc(string) - json-rpc version.
  • result(object) - an object with the following fields:
    • nextPageIndex(integer number) - next page index.
    • total(integer number) - total of the response data count.
    • data(array of object, defined below) - response data.
  • Object schema:
    • contractAddress(hex string) - the address of the contract.
    • blockNumber(integer number) - the block that the transaction was included in.
    • accountAddress(hex string) - the address of the account.
    • value(string) - the account's balance.

Example

Request

curl
TypeScript
curl --location --request POST 'apis.blockvision.org/v1/<your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"jsonrpc": "2.0",
"method": "erc20_tokenHolders",
"params": {
"contractAddress":"0x31d911bf5945644115bd20382acadc399175e117",
"pageSize":10,
"pageIndex":1
}
}'
import { BlockVisionProvider, BvNetwork } from 'blockvision.js'
// Optional parameters, but default to eth-mainnet and default api-key.
const bv = new BlockVisionProvider(BvNetwork.ETH_MAINNET)
// Access the BlockVision FT API
bv.getERC20TokenHolders({
contractAddress: '0x8C6bf16C273636523C29Db7DB04396143770F6A0'
}).then(console.log)

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": [
{
"contractAddress": "",
"blockNumber": 10362737,
"accountAddress": "0x42f58a73E8D1ABcde3D9ae90D7871515daE61c3b",
"value": "99990000000000000000"
},
{
"contractAddress": "",
"blockNumber": 10362737,
"accountAddress": "0x7a8cf01D2d22F4215DB92633096eeD373B8B3f0d",
"value": "10000000000000000"
}
],
"nextPageIndex": 1,
"total":1024
}
}