Get NFT Assets

Returns a list of NFT assets in a given collection.

Endpoint: getNftAssets

Method: POST

Arguments

NameTypeDescription
addressString!

The contract address of the NFT collection.

Required
cursorString

The cursor to use for pagination.

fetchMissingAssetsBoolean

Whether to trigger fetching onchain metadata for missing assets. Defaults to false. Fetch results are delayed and can be ingested realtime via onNftAssetsCreated subscription. Free tier API users are limited to 1 missing asset fetch per request, and may only retry fetching a missing asset once per week. To remove these limitations, please upgrade your API plan at https://www.dashboard.defined.fi/plan.

limitInt

The maximum number of NFT assets to return.

networkIdInt!

The network ID the NFT collection is deployed on.

Required
tokenIds[String]

An optional list of token IDs to filter by.

Response

NameTypeDescription
cursorStringA cursor for use in pagination.
itemErrors[NftAssetError]A list of errors encountered while fetching the NFT assets. Errors correspond to null values in items by array index.
items[NftAsset]A list of NFT assets.

NameTypeDescription
addressString!The contract address of the NFT collection.
attributes[NftAssetAttribute!]The attributes for the NFT asset.
descriptionStringThe description of the NFT asset.
idString!The ID of the NFT asset (address:networkId).
mediaNftAssetMediaThe NFT asset media.
nameStringThe name of the NFT asset.
networkIdInt!The network ID the NFT collection is deployed on.
originalImageStringThe source image URI linked by smart contract metadata.
quantityStringThe number of NFT assets with the same NFT token ID. Only applicable for ERC1155 tokens.
tokenIdString!The token ID of the NFT asset.
uriStringThe URI provided by the smart contract. Typically JSON that contains metadata.

Explore

πŸ‘‹

Join our Discord

Ask questions, share what you're working on and request new features :two-men-holding-hands::two-women-holding-hands: