listNFTEvents

Get a list of NFT events matching the given filters.

How to use listNFTEvents method ?

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

Parameters

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

ParameterTypeDescription

contractType

string

The type of the contract (one of: erc721, erc1155)

fromBlock

number

Starting block for querying NFT events

toBlock

number

Ending block for querying NFT events

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

ParameterTypeDescription

count

number

The number of NFT events matching the given filters

nextPageKey

string

Key to get the next page of results if more are available.

events

array<object>

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

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

  • blockNumber

  • transferIndex

Example Request and Result for listNFTEvents

In this section, you can find an illustrative example of a request made to retrieve the count of NFT events matching the filters and the NFTEvent objects using the listNFTEvents 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 owned by a wallet and the array of NFTEvent objects.

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

Query Parameters

NameTypeValue

contractType

string

erc1155

fromBlock

string

625897
{
  "count": 3,
  "events": [
    {
      "contractAddress": "0x03b0774705a2ca356347181884569cd810155c1b9e8de9ec15d93410cc1e94c3",
      "contractName": "Stark Fox Club",
      "contractSymbol": "SFC",
      "contractType": "erc1155",
      "tokenId": "19",
      "eventType": "Transfer",
      "amount": "1",
      "fromAddress": "0x06f5c18ac38d507c0c46ffd62960bc7383c029795d26db2ca60170206c0d46d1",
      "toAddress": "0x003530184b8fd2e566cfe23f58d5ff37c341dab6d674da4a4807d7406dd699cb",
      "blockHash": "0x0635226803cfbbac38a303b20b6c206c621ddc97f89a090bc9537db4743b44f8",
      "blockNumber": 625898,
      "blockTimestamp": "2024-03-22T23:02:19.000Z",
      "transactionHash": "0x00a2f3b3311328c6dc47d7962bc0800f388a08ec6e073d355dc2696d540bf4fd"
    },
    {
      "contractAddress": "0x03b0774705a2ca356347181884569cd810155c1b9e8de9ec15d93410cc1e94c3",
      "contractName": "Stark Fox Club",
      "contractSymbol": "SFC",
      "contractType": "erc1155",
      "tokenId": "20",
      "eventType": "Transfer",
      "amount": "1",
      "fromAddress": "0x000449d2755f88142b8308c5f33456ab5579a9870617748e0708c98c5f7ddf65",
      "toAddress": "0x003530184b8fd2e566cfe23f58d5ff37c341dab6d674da4a4807d7406dd699cb",
      "blockHash": "0x0635226803cfbbac38a303b20b6c206c621ddc97f89a090bc9537db4743b44f8",
      "blockNumber": 625898,
      "blockTimestamp": "2024-03-22T23:02:19.000Z",
      "transactionHash": "0x058554cf5879aaecd69c91a88841bc5331eef38a4e5bf446f83342fa9acd145b"
    },
    {
      "contractAddress": "0x073511f702d6ef8c0dc89da9bba50931e9cb4cc44169681ba8bc63988039b19d",
      "contractName": "Stark Airdrop Box",
      "contractSymbol": "STARK",
      "contractType": "erc1155",
      "tokenId": "1",
      "eventType": "Transfer",
      "amount": "1",
      "fromAddress": "0x000449d2755f88142b8308c5f33456ab5579a9870617748e0708c98c5f7ddf65",
      "toAddress": "0x003530184b8fd2e566cfe23f58d5ff37c341dab6d674da4a4807d7406dd699cb",
      "blockHash": "0x075ea4e03541f67a08e23cd30dfb67ae02fa01b1a3bb13340b854632584493fd",
      "blockNumber": 625897,
      "blockTimestamp": "2024-03-22T23:00:13.000Z",
      "transactionHash": "0x07df447b60a7352764f81ea58fd7683e5c1576296e23570578f0ae97756e454d"
    }
  ]
}
curl -X GET https://starknet-mainnet.blastapi.io/<project-id>/builder/listNFTEvents?contractType=erc1155&fromBlock=625897 \
-H 'Content-Type: application/json' \

Last updated