getNFTEvents
Get NFT events (mint, burn, transfer) associated with a single NFT.
How to use getNFTEvents method ?
Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getNFTEvents 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 |
tokenId | string | The token Id (hex or number) |
fromBlock | number | Starting block for querying |
toBlock | number | Ending block for querying |
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 NFT events |
nextPageKey | string | Key to get the next page of results if more are available. |
events | array<object> | array of NFTEvent objects |
contractAddress | string | The address of the NFT contract |
contractName | string | The name of the NFT contract |
contractSymbol | string | The symbol of the NFT contract |
contractType | string | The type of the NFT contract ('erc721' or 'erc1155') |
tokenId | string | The token ID of the NFT |
eventType | string | The event type (Mint, Transfer, Burn) |
amount | string | The quantity of tokens transferred |
toAddress | string | The destination address for the NFT Event |
blockHash | string | The block hash of the NFT Event Occurrence |
blockNumber | number | The height of the block of the NFT Event Occurrence |
blockTimestamp | string | The block timestamp of the NFT Event Occurrence |
transactionHash | string | Transaction Hash of the NFT Event Occurrence |
This API is paginated, response items are ordered descending by:
blockNumber
transferIndex
Example Request and Result for getNFTEvents
In this section, you can find an illustrative example of a request made to retrieve the count of the NFTEvents and the events objects using the getNFTEvents 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 NFT events and the array of NFTEvent objects.
GET
https://starknet-mainnet.blastapi.io/<project_id>/builder/getNFTEvents?
Query Parameters
Name | Type | Value |
---|---|---|
contractAddress | string | |
tokenId | string |
Last updated