Marketplace API
NFT models

NFT models#

The primary object in the OKX API is NFT. It represents a unique digital item with its ownership managed by blockchain.
The below OKX Football Cup is an example of an NFT shown on OKX.

nft

NFT model#

ParameterTypeDescription
nameStringName of the NFT
tokenIdStringToken ID of the NFT
tokenUriStringNFT address stored in Metadata
imageStringImage of the NFT. Note: it is a cached url stored on our end
imagePreviewUrlStringPreview image of the NFT. Note: it is a cached url stored on our end
imageThumbnailUrlStringThumbnail image of the NFT. Note: it is a cached url stored on our end
animationUrlStringAnimation resource url for the NFT. Note: it is a cached url stored on our end
attributesObjectAttributes info of the NFT, an object of Attributes Model
assetContractsObjectContract info of the NFT, an object of Asset Contract Model
collectionObjectCollection info of the NFT, an object of Collection Model

Attributes model#

Attributes are special properties of an NFT. They can be either numbers or strings. Below is an example of how OKX displays the attributes for a specific NFT.

ParameterTypeDescription
trait_typeStringName of the attribute (e.g. color)
valueStringValue of the attribute (e.g., string/number)
display_typeStringFormat of the attribute (displayed in number, boost_percentage, boost_number, or date)
Table of contents