curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "searchAssets",
"params": {
"ownerAddress": "4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue",
"tokenType": "fungible",
"limit": 50,
"options": {
"showFungible": true
}
}
}
'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"total": 1,
"limit": 20,
"page": 1,
"items": [
{
"interface": "ProgrammableNFT",
"id": "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
"content": {
"$schema": "https://schema.metaplex.com/nft1.0.json",
"json_uri": "https://madlads.s3.us-west-2.amazonaws.com/json/8420.json",
"files": [
{
"uri": "https://madlads.s3.us-west-2.amazonaws.com/images/8420.png",
"mime": "image/png",
"cdn_uri": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fmadlads.s3.us-west-2.amazonaws.com%2Fimages%2F8420.png"
}
],
"metadata": {
"name": "Mad Lads #8420",
"symbol": "MAD",
"json_name": "Mad Lads #8420",
"description": "Fock it.",
"attributes": [
{
"trait_type": "Gender",
"value": "Male"
},
{
"trait_type": "Type",
"value": "Light"
}
],
"token_standard": "ProgrammableNonFungible"
},
"links": {
"image": "https://madlads.s3.us-west-2.amazonaws.com/images/8420.png",
"external_url": "https://madlads.com"
},
"category": "image"
},
"authorities": [
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"scopes": [
"full"
]
}
],
"compression": {
"eligible": false,
"compressed": false,
"data_hash": "",
"creator_hash": "",
"asset_hash": "",
"tree": "",
"seq": 0,
"leaf_id": 0
},
"grouping": [
{
"group_key": "collection",
"group_value": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w"
}
],
"royalty": {
"royalty_model": "creators",
"target": null,
"percent": 0.042,
"basis_points": 420,
"primary_sale_happened": true,
"locked": false
},
"creators": [
{
"address": "5XvhfmRjwXkGp3jHGmaKpqeerNYjkuZZBYLVQYdeVcRv",
"share": 0,
"verified": true
},
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"share": 100,
"verified": true
}
],
"ownership": {
"frozen": true,
"delegated": false,
"delegate": null,
"ownership_model": "single",
"owner": "4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 254
},
"mutable": true,
"burnt": false,
"token_info": {
"supply": 1,
"decimals": 0,
"token_program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
}
}
],
"last_indexed_slot": 386120417
}
}DAS API
searchAssets DAS 方法
按所有者、集合、创建者、权限、名称和资产字段搜索资产,支持游标或页码分页。查看 searchAssets 的参数和代码示例。
POST
/
curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "searchAssets",
"params": {
"ownerAddress": "4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue",
"tokenType": "fungible",
"limit": 50,
"options": {
"showFungible": true
}
}
}
'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"total": 1,
"limit": 20,
"page": 1,
"items": [
{
"interface": "ProgrammableNFT",
"id": "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
"content": {
"$schema": "https://schema.metaplex.com/nft1.0.json",
"json_uri": "https://madlads.s3.us-west-2.amazonaws.com/json/8420.json",
"files": [
{
"uri": "https://madlads.s3.us-west-2.amazonaws.com/images/8420.png",
"mime": "image/png",
"cdn_uri": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fmadlads.s3.us-west-2.amazonaws.com%2Fimages%2F8420.png"
}
],
"metadata": {
"name": "Mad Lads #8420",
"symbol": "MAD",
"json_name": "Mad Lads #8420",
"description": "Fock it.",
"attributes": [
{
"trait_type": "Gender",
"value": "Male"
},
{
"trait_type": "Type",
"value": "Light"
}
],
"token_standard": "ProgrammableNonFungible"
},
"links": {
"image": "https://madlads.s3.us-west-2.amazonaws.com/images/8420.png",
"external_url": "https://madlads.com"
},
"category": "image"
},
"authorities": [
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"scopes": [
"full"
]
}
],
"compression": {
"eligible": false,
"compressed": false,
"data_hash": "",
"creator_hash": "",
"asset_hash": "",
"tree": "",
"seq": 0,
"leaf_id": 0
},
"grouping": [
{
"group_key": "collection",
"group_value": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w"
}
],
"royalty": {
"royalty_model": "creators",
"target": null,
"percent": 0.042,
"basis_points": 420,
"primary_sale_happened": true,
"locked": false
},
"creators": [
{
"address": "5XvhfmRjwXkGp3jHGmaKpqeerNYjkuZZBYLVQYdeVcRv",
"share": 0,
"verified": true
},
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"share": 100,
"verified": true
}
],
"ownership": {
"frozen": true,
"delegated": false,
"delegate": null,
"ownership_model": "single",
"owner": "4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 254
},
"mutable": true,
"burnt": false,
"token_info": {
"supply": 1,
"decimals": 0,
"token_program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
}
}
],
"last_indexed_slot": 386120417
}
}
传入的每个筛选条件都必须匹配。也可使用
search_assets 调用。
- 请包含
ownerAddress、grouping、creatorAddress、authorityAddress或supplyMint之一。否则搜索会遍历所有资产,并且往往在检查 200,000 个候选资产后因 “too many assets” 错误而失败。 grouping是包含两项的数组,例如["collection", "<address>"]。tokenType(fungible、nonFungible、regularNft、compressedNft、all)需要ownerAddress,且不能与ownerType或interface组合使用。name是链上名称中区分大小写的子串,需要ownerAddress。- 未设置
ownerType或tokenType时,同质化代币不会返回。使用tokenType: "fungible"或"all",或ownerType: "token"来包含它们。 - 不支持:
conditionType: "any"和negate: true会返回错误。royaltyTarget和agentToken会被接受但不匹配任何资产,compressible: true、creators以外的royaltyTargetType,以及V1_PRINT、V2_NFT、LEGACY_NFT、Identity和Executable接口也是如此。 - 未知参数会以 invalid params 错误被拒绝。
- 分页、排序和
limit(默认值和最大值均为 1000)与 getAssetsByGroup 相同:默认使用cursor,也可使用page或before/after。id以外的排序需要page。 - 消耗 1 积分,并计入套餐的 DAS RPS 限制。
请求体
application/json
此页面对您有帮助吗?