getNFTHolders
Get holders of the given NFT.
How to use getNFTHolders method ?
Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getNFTHolders method effectively using Blast.
Parameters
Below, you can find the query parameters accepted by the method.
Parameter | Type | Description |
---|---|---|
contractAddress* | string | The NFT contract address |
tokenId* | string | The token ID |
blockNumber | string | Specifies the block number at which to query for NFT holders |
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 total number of NFTs belonging to the given collection |
nextPageKey | string | Key to get the next page of results if more are available. |
holders | array<object> | array of NFTBalance objects |
contractAddress | string | The contract address of the NFT collection |
contractType | string | The type of the NFT contract ('erc721' or 'erc1155') |
tokenId | string | The token ID of the NFT |
walletAddress | string | The address which owns the NFT now (null for erc1155 tokens) |
tokenBalance | string | The balance of NFT owned by the owner. |
This API is paginated, response items are ordered descending by:
tokenBalance
ownerAddress
Example Request and Result for getNFTHolders
In this section, you can find an illustrative example of a request made to retrieve the total number of NFTs included in the specified group and the NFTBalance objects using the getNFTHolders 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/getNFTHolders?
Query Parameters
Name | Type | Value |
---|---|---|
contractAddress | string | |
tokenId | string |
Last updated