getwalletnftcollections-2
description: Get all NFT collections currently owned by the given wallet address.
getWalletNFTCollections
How to use getWalletNFTCollections method ?
Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getWalletNFTCollections method effectively using Blast.
Parameters
Below, you can find the query parameters accepted by the method.
Parameter | Type | Description |
---|---|---|
walletAddress* | string | The querying wallet address |
contractType* | string | The type of the contract (one of: erc721, erc1155) |
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 collections currently owned by the given wallet address. |
nextPageKey | string | Key to get the next page of results if more are available. |
collections | array<object> | array of NFTCollection objects (for more information see the getNFTCollection method) |
This API is paginated, response items are ordered descending by:
- blockNumber
- transferIndex
Example Request and Result for getWalletNFTCollections
In this section, you can find an illustrative example of a request made to retrieve the count of NFT collections currently owned by a wallet address and the NFTCollection objects using the getWalletNFTCollections 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 collections currently owned by a wallet and the array of NFTCollection objects.
GET
https://starknet-mainnet.blastapi.io/<project_id>/builder/getWalletNFTCollections?
Query Parameters
Name | Type | Value |
---|---|---|
walletAddress | string |
|
contractType | string |
|
pageSize | number |
|
- 200: OK
{
"count": 2,
"next_page_key": "ZTVmNWIwZDYwNmI4OjE3MTExNTE3MzM6MTA0MjM6MHgwMTQzNTQ5OGJmMzkzZGE4NmI0NzMzYjkyNjRhODZiNThhNDJiMzFmOGQ4YjhiYTMwOTU5M2U1YzE3ODQ3Njcy",
"result": [
{
"contractAddress": "0x07861c4e276294a7e859ff0ae2eec0c68300ad9cbb43219db907da9bad786488",
"contractName": "Mint Square Storefront",
"contractSymbol": "MINTSQ",
"contractType": "erc721",
"deployBlockNumber": 3703,
"totalSupply": "54014",
"numberOfDistinctTokens": 54014,
"numberOfOwners": 38619,
"numberOfTransfers": 80137,
"description": null,
"website": null,
"cachedBanner": null,
"cachedLogo": {
"mimetype": "image/png",
"size": 56203,
"url": "https://builder-assets.blastapi.io/124512fd7b9d0651178893c9b1e5199ecabf491e"
}
},
{
"contractAddress": "0x04a3621276a83251b557a8140e915599ae8e7b6207b067ea701635c0d509801e",
"contractName": "Mint Square Storefront",
"contractSymbol": "MINTSQ",
"contractType": "erc721",
"deployBlockNumber": 9314,
"totalSupply": "529944",
"numberOfDistinctTokens": 529944,
"numberOfOwners": 386361,
"numberOfTransfers": 640612,
"description": "Mint Square Shared NFT Storefront.",
"website": "https://mintsquare.io/starknet",
"cachedBanner": {
"mimetype": "image/png",
"size": 25162,
"url": "https://builder-assets.blastapi.io/d7ecc979c8d0bb608e5c66bdbf4cf50742ec43d8"
},
"cachedLogo": {
"mimetype": "image/png",
"size": 18136,
"url": "https://builder-assets.blastapi.io/f30ac2f726c898ad46a64b8bd73830ea50cb3707"
}
}
]
}
curl -X GET https://starknet-mainnet.blastapi.io/<project-id>/builder/getWalletNFTCollections?pageSize=2&walletAddress=0x039ac13f0c2d14b2775f28de786aeb7064b618e8c8945cc67c1ac6e40d74a64d&contractType=erc721_1155 \
-H 'Content-Type: application/json' \