Skip to main content

getwalletnftevents


description: >- Get NFT events (mint, burn, transfer) associated with the given wallet address.


getWalletNFTEvents

How to use getWalletNFTEvents method ?

Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getWalletNFTEvents method effectively using Blast.

Parameters

Below, you can find the query parameters accepted by the method.

ParameterTypeDescription

walletAddress*

stringThe querying wallet address
contractAddressstringThe contract address
fromBlocknumberStarting block for querying
toBlocknumberEnding block for querying
pageSizenumber

Maximum number of records to be retrieved in one page (max 100, default 25)

pageKeystring

Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response

Returns

ParameterTypeDescription
countnumberThe number of NFT events associated with the given wallet address
nextPageKeystringKey to get the next page of results if more are available.
eventsarray<object>

array of NFTEvent objects (for more information see the getNFTEvents method)

info

This API is paginated, response items are ordered descending by:

  • blockNumber
  • transferIndex

Example Request and Result for getWalletNFTEvents

In this section, you can find an illustrative example of a request made to retrieve the count of NFT events currently owned by a wallet address and the NFTEvent objects using the getWalletNFTEvents method.

info

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 owned by a wallet and the array of NFTEvent objects.

GET https://starknet-mainnet.blastapi.io/<project_id>/builder/getWalletNFTEvents?

Query Parameters

NameTypeValue
walletAddressstring

0x039ac13f0c2d14b2775f28de786aeb7064b618e8c8945cc67c1ac6e40d74a64d

contractAddressstring

0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1

fromBlocknumber
625038
{
"count": 1,
"events": [
{
"contractAddress": "0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1",
"contractName": "Spok",
"contractSymbol": "SPOK",
"contractType": "erc721",
"tokenId": "2770917",
"eventType": "Transfer",
"amount": "1",
"fromAddress": "0x039ac13f0c2d14b2775f28de786aeb7064b618e8c8945cc67c1ac6e40d74a64d",
"toAddress": "0x06ba9b7c70f04bb001e828dbc6fc9e257e0bc1a581311384ee7cf71a9eacd400",
"blockHash": "0x0782a2bec8ca409d67c09dcce5f72e2a10fde08cbc47f9499e1ac181e8c48ad6",
"blockNumber": 625038,
"blockTimestamp": "2024-03-21T20:58:54.000Z",
"transactionHash": "0x007c44ad9e4ab3f74e3a68ab4e1ddc36bc6fd66e09c8309ffda9a7b4ef6d7b54"
}
]
}
curl -X GET https://starknet-mainnet.blastapi.io/<project-id>/builder/getWalletNFTEvents?walletAddress=0x039ac13f0c2d14b2775f28de786aeb7064b618e8c8945cc67c1ac6e40d74a64d&contractAddress=0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1&fromBlock=625038 \
-H 'Content-Type: application/json' \