NFT Balances
Retrieving NFTs
Below we have two images from Fortress App built on top of the Wallet APIs. Image 1
shows an iterated array of nfts contained within a wallet. Image 2
shows an individual token
and associated metadata for a more in depth view.
The numbers below correspond with the numbers in the display made to retrieve these items for your frontend
GET /v2/wallets/{walletId}/nft-balances
//Sample Response
..."nftTokenBalances": [
{
"tokenId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"amount": "string",
"token": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"contractAddress": "string",
"blockchainTokenId": "string",
"metadata": {
"name": "string",
"description": "string",
"image": "string",
"animationUrl": "string",
"externalUrl": "string",
"backgroundColor": "string",
"editionId": 0,
"totalEdition": 0,
"creatorName": "string",
"creatorImageUrl": "string",
"creatorExternalPageUrl": "string",...
GET /v1/tokens/{tokenId}
//2a: Sample Response
..."metadata": {
"name": "string",
"description": "string",
"image": "string",
"animationUrl": "string",
"externalUrl": "string",
"backgroundColor": "string",
"editionId": number,
"totalEdition": number,
"creatorName": "string",
"creatorImageUrl": "string",...
Whitelisting NFT Smart Contracts
Fortress allows integrators to only show NFTs from a predefined list of smart contract addresses. Integrators can turn on or off the feature as part of their set-up configurations. Integrators can add and delete smart contracts to their whitelist. If a wallet contains an NFT that was not created by a smart contract on the list, then the Wallet API will not return the NFT in the API responses.
Updated 10 days ago