Links

nft_collectionHolders

Get a list of addresses that own NFTs from a specific collection at a given time, which is sorted by balance value from high to low.
Through nft_collectionHolders, you can fetch the ranking information based on how many NFT that an account owns, contractAddress is necessary. The ranking is default from hight to low. Using this API, you could see which accounts are the royal holders of certain NFT collection. This could be used in some specific marketing strategies and airdrops.
Supported on Ethereum, BNB Chain, Optimism, and Arbitrum.

Parameters

Object - An object with the following fields(required):
  • contractAddress(hex string, required) - the contract address of the collection. BlockVision currently support both ERC721 and ERC1155.
  • blockNumber(integer number, optional) - specify the blockNumber for snapshot query (default latest). BlockVision can not only support users to query the current position, but also support users to query the historical information at any time.
  • 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.
    • data(array of object, defined below) - response data.
  • Object schema:
    • accountAddress(hex string) - account address which hold the collection.
    • contractAddress(hex string) - contract of address of the collection.
    • value(string) - account balance.
    • blockNumber(integer number) - block number.

Example

Request

curl
TypeScript
curl https://api.blockvision.org/v1/<api key> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "nft_collectionHolders",
"params": {
"contractAddress":"0xad9Fd7cB4fC7A0fBCE08d64068f60CbDE22Ed34C",
"blockNumber": 0,
"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 NFT API
bv.getNFTCollectionHolders({
contractAddress: '0xad9Fd7cB4fC7A0fBCE08d64068f60CbDE22Ed34C',
blockNumber: 0
}).then(console.log)

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": [
{
"contractAddress": "",
"blockNumber": 14581527,
"accountAddress": "0xe995A353a97A33e2dBac9E70bA6778Db86728f4E",
"value": "43"
},
{
"contractAddress": "",
"blockNumber": 14758143,
"accountAddress": "0xa4cEdBF76beeda93b3B703DcC5Aac6b3C0CE8529",
"value": "40"
},
{
"contractAddress": "",
"blockNumber": 13627932,
"accountAddress": "0xfa951187D3521e5dbe8D734d9416F965413a0929",
"value": "38"
},
{
"contractAddress": "",
"blockNumber": 13631961,
"accountAddress": "0x870a00aC9c35b913c779b170A83E40476dC2F81b",
"value": "34"
},
{
"contractAddress": "",
"blockNumber": 14591051,
"accountAddress": "0x9f179f91bF567bDF3572B541053E9A361E0c4163",
"value": "34"
},
{
"contractAddress": "",
"blockNumber": 13632036,
"accountAddress": "0x64fEbd90dFCd599dC6AC3d96ba262836f761b352",
"value": "34"
},
{
"contractAddress": "",
"blockNumber": 14535421,
"accountAddress": "0x149fD340cA0DF54228aACdAD7755B05d0E2b23d9",
"value": "32"
},
{
"contractAddress": "",
"blockNumber": 13632045,
"accountAddress": "0xc3fD372FaE555bDAF19C95a2552b2FE3EB3bb491",
"value": "31"
},
{
"contractAddress": "",
"blockNumber": 14663735,
"accountAddress": "0x9926c366F076cF3FAa655EbC7A58C2F20C0931B8",
"value": "30"
},
{
"contractAddress": "",
"blockNumber": 14622950,
"accountAddress": "0xa0eF45d5c903cF434b7dB2a92DF14C3c56E2058A",
"value": "30"
}
],
"nextPageIndex": 2
}
}