getNFTCollectionHolders
Get holders of the given NFT collection.
How to use getNFTCollectionHolders method ?
Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getNFTCollectionHolders method effectively using Blast.
Parameters
Below, you can find the query parameters accepted by the method.
Parameter | Type | Description |
---|---|---|
contractAddress* | string | The contract address of the NFT collection |
blockNumber | string | The block number when the contract was deployed |
pageSize | number | Maximum number of records to be retrieved in one page (max 100, default 25) |
pageKey | string | Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response |
Returns
Parameter | Type | Description |
---|---|---|
count | number | The number of holders for the given NFT |
nextPageKey | string | Key to get the next page of results if more are available. |
holders | array<object> | array of NFTCollectionBalance objects |
contractAddress | string | The contract address of the NFT collection |
contractType | string | The type of the NFT contract ('erc721' or 'erc1155') |
walletAddress | string | The address which owns the NFT now (null for erc1155 tokens) |
totalTokenBalance | string | The total balance of tokens owned by the specified owner in the collection |
distinctTokenBalance | string | The balance of distinct tokens owned by the specified owner in the collection |
This API is paginated, response items are ordered descending by:
totalTokenBalance
ownerAddress
Example Request and Result for getNFTCollectionHolders
In this section, you can find an illustrative example of a request made to retrieve the number of holders for a specific NFT and the NFTCollectionBalance objects using the getNFTCollectionHolders method.
The example in this section uses a non-existing project id.
Make sure you replace it with your Starknet endpoint when issuing the Builder API calls.
Don't have a project id? Here's a straightforward guide on how to obtain one!
Returns the total number of NFTs belonging to the given collection and the array of NFTBalance objects.
GET
https://starknet-mainnet.blastapi.io/<project_id>/builder/getNFTCollectionHolders?
Query Parameters
Name | Type | Value |
---|---|---|
contractAddress | string | |
pageSize | number |
Last updated