Query the NFT assets of all chains or a chain under a specified wallet, or a specified NFT asset.
POST https://www.okx.com/api/v5/waas/asset/get-nft-assets
Parameter | Type | Required | Description |
---|---|---|---|
walletId | String | Yes | Unique identifier of the wallet |
chainIds | Array<String> | No | Unique identifier of the chain (if present, and there is no coinId dimension, query by chainId dimension) |
tokenContractAddress | Array<String> | No | Contract address information of the project collection (if available, query according to nft contract address dimension) |
limit | String | No | How many items to query per page. The default value is 20 |
cursor | String | No | Query cursor. Default is the first page |
Parameter | Type | Description |
---|---|---|
nftAssetsList | Array<Object> | nft Asset array |
cursor | String | Query cursor |
nftAssetsList (nft assets)
Parameter | Type | Description |
---|---|---|
name | String | The name of the NFT |
tokenId | String | NFT token ID |
tokenUri | String | Metadata address of NFT |
image | String | NFT image address |
imagePreviewUrl | String | NFT image preview address |
imageThumbnailUrl | String | NFT image thumbnail address |
animationUrl | String | NFT audio and video resource address |
attributes | String | Special attribute information of NFT, an attribute model |
assetContract | Object | Contract information, a contract information model object |
collection | Object | Collection information, a collection model object |
ownerAddress | String | The address of the asset owner |
isLazyMintType | Boolean | Whether the minting is delayed and no transfer has occurred |
Attributes (Array. StringObject)
Parameter | Type | Description |
---|---|---|
trait_type | String | The name of the special attribute (such as color) |
value | String | The value of the special attribute (may be a string or a numeric value) |
display_type | String | How special attributes should be displayed (optional options may be numbers, percentages, percentage data, dates, etc.) |
assetContract
Parameter | Type | Description |
---|---|---|
chain | String | The chain to which the contract related to this collection belongs |
contractAddress | String | The contract address related to this collection |
tokenStandard | String | The protocol type corresponding to the contract, such as ERC721, ERC1155 |
ownerAddress | String | The owner address corresponding to this contract |
erc2981 | Boolean | Whether the contract supports the 2981 protocol |
collection
Parameter | Type | Description |
---|---|---|
name | String | Collection name |
des | String | Collection Introduction |
image | String | Collection avatar image address |
backgroundImage | String | Collection background image address |
slug | String collection slug | Name, the unique identifier of the collection |
certificateFlag | Boolean | Collection certification flags |
officialWebsite | String | Collection official website address |
instagramUrl | String | Collection Instagram address |
discordUrl | String | Collection Discord address |
mediumUrl | String | Collection Medium address |
twitterUrl | String | Collection Twitter address |
categoryList | Array | Collection category tag list |
stats | Object | This collection corresponds to statistical data, including transaction volume, floor price, etc., a collection statistical information model object |
stats
Parameter | Type | Description |
---|---|---|
latestPrice | String | The latest transaction price of this collection |
totalVolume | String | The total transaction volume of this collection |
totalCount | String | The number of NFTs in this collection |
ownerCount | String | The number of owners of this collection |
floorPrice | String | The floor price of this collection |
curl --location --request POST 'https://www.okx.com/api/v5/waas/asset/get-assets' \
--header 'Content-Type: application/json' \
--header 'OK-ACCESS-PROJECT: 86af********d1bc' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z' \
--data-raw '{
"walletId":"13886e05-1265-4b79-8ac3-b7ab46211002",
"chainIds":["1"],
"limit": 1,
"cursor":"Nzg0MjE3MTI1MDMyMDc="
}'
{
"code": 0,
"msg": "success",
"data": [{
"cursor": "MTMyMTY3MDU4MjgxNDM5",
"nftAssetsList": [{
"tokenId": "1165534",
"name": "Bag #1165534",
"attributes": "",
"image": "https://static.coinall.ltd/cdn/nft/files/89e9616d-1e3c-4d82-8e68-abb82edd59b2.svg",
"imagePreviewUrl": "https://static.coinall.ltd/cdn/nft/files/89e9616d-1e3c-4d82-8e68-abb82edd59b2.svg",
"imageThumbnailUrl": "https://static.coinall.ltd/cdn/nft/files/89e9616d-1e3c-4d82-8e68-abb82edd59b2.svg",
"tokenUri": null,
"animationUrl": "https://static.coinall.ltd/cdn/nft/files/89e9616d-1e3c-4d82-8e68-abb82edd59b2.svg",
"assetContract": {
"chain": "Ethereum",
"contractAddress": "0x1dfe7ca09e99d10835bf73044a23b73fc20623df",
"tokenStandard": "erc721",
"ownerAddress": "0xf296178d553c8ec21a2fbd2c5dda8ca9ac905a00",
"erc2981": false
},
"collection": {
"stats": {
"latestPrice": 75841.6,
"totalVolume": 1.777921917306267E9,
"totalCount": 135463,
"ownerCount": 25301,
"floorPrice": 3.7489
},
"name": "More Loot",
"des": "Welcome to the home of More Loot on OKX. Discover the best items in this collection.",
"image": "",
"backgroundImage": "",
"slug": "more-loot",
"certificateFlag": false,
"officialWebsite": "",
"twitterUrl": "",
"instagramUrl": "",
"discordUrl": "",
"mediumUrl": "",
"categoryList": []
},
"isLazyMintType": false,
"ownerAddress": "0xf4c549028f6947669a8bc71719415ab056ce81c8"
}]
}]
}