[英]How to Retrieve TRAITS of NFT from OpenSea with JavaScript?
I have a website and i am wonder how can i get the Traits of NFT from OpenSea.我有一个网站,我想知道如何从 OpenSea 获得 NFT 的特征。 Can anybody help me and i really need a suggestions.
任何人都可以帮助我,我真的需要一个建议。 Thank you for your help.
谢谢您的帮助。 Below is the traits i fetch on OpenSea docs
以下是我在 OpenSea 文档中获取的特征
"traits": [
{
"trait_type": "original shirt",
"value": "collared shirt white",
"display_type": null,
"max_value": null,
"trait_count": 0,
"order": null
},
{
"trait_type": "original background",
"value": "red",
"display_type": null,
"max_value": null,
"trait_count": 0,
"order": null
},
{
"trait_type": "original type",
"value": "plain mfer",
"display_type": null,
"max_value": null,
"trait_count": 0,
"order": null
},
{
"trait_type": "original eyes",
"value": "eye mask",
"display_type": null,
"max_value": null,
"trait_count": 0,
"order": null
},
{
"trait_type": "mouth",
"value": "smile",
"display_type": null,
"max_value": null,
"trait_count": 0,
"order": null
},
{
"trait_type": "original headphones",
"value": "white headphones",
"display_type": null,
"max_value": null,
"trait_count": 0,
"order": null
},
{
"trait_type": "original smoke",
"value": "cig black",
"display_type": null,
"max_value": null,
"trait_count": 0,
"order": null
},
{
"trait_type": "original 4:20 watch",
"value": "oyster silver",
"display_type": null,
"max_value": null,
"trait_count": 0,
"order": null
}
],
Check out API on here: https://docs.opensea.io/reference/retrieving-assets-rinkeby在此处查看 API: https://docs.opensea.io/reference/retrieving-assets-rinkeby
The OpenSea API allows you to retrieve the traits of an NFT by making a GET request to the /nft/{id}/traits endpoint. OpenSea API 允许您通过向 /nft/{id}/traits 端点发出 GET 请求来检索 NFT 的特征。 The {id} in the endpoint is the ID of the NFT for which you want to retrieve the traits.
端点中的 {id} 是您要为其检索特征的 NFT 的 ID。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.