Get Assets by Authority
Get a list of assets with a specific authority.
Last updated
Was this helpful?
Get a list of assets with a specific authority.
Last updated
Was this helpful?
This will return a list of assets for the given authority provided. This can define compressed or standard NFTs.
The page
parameter in the request starts at 1
const url = "https://mainnet.helius-rpc.com/?api-key=<api-key>"
const getAssetsByAuthority = async () => {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'my-id',
method: 'getAssetsByAuthority',
params: {
authorityAddress: '2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW',
page: 1, // Starts at 1
limit: 1000
},
}),
});
const { result } = await response.json();
console.log("Assets by Authority: ", result.items);
};
getAssetsByAuthority();
The version of the JSON-RPC protocol.
An ID to identify the request.
The name of the DAS method to invoke.
POST / HTTP/1.1
Host: mainnet.helius-rpc.com
Content-Type: application/json
Accept: */*
Content-Length: 366
{
"jsonrpc": "2.0",
"id": "text",
"method": "getAssetsByAuthority",
"params": {
"authorityAddress": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"page": 1,
"limit": 100,
"sortBy": {
"sortBy": "created",
"sortDirection": "asc"
},
"before": "string",
"after": "string",
"options": {
"showUnverifiedCollections": true,
"showCollectionMetadata": true,
"showGrandTotal": true,
"showInscription": true
}
}
}
{
"jsonrpc": "2.0",
"result": {
"total": 1,
"limit": 1,
"page": 1,
"items": [
{
"interface": "ProgrammableNFT",
"id": "JEGruwYE13mhX2wi2MGrPmeLiVyZtbBptmVy9vG3pXRC",
"content": {
"$schema": "https://schema.metaplex.com/nft1.0.json",
"json_uri": "https://madlads.s3.us-west-2.amazonaws.com/json/6867.json",
"files": [
{
"uri": "https://madlads.s3.us-west-2.amazonaws.com/images/6867.png",
"cdn_uri": "https://cdn.helius-rpc.com/cdn-cgi/image//https://madlads.s3.us-west-2.amazonaws.com/images/6867.png",
"mime": "image/png"
}
]
},
"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
}
],
"ownership": {
"frozen": true,
"delegated": false,
"delegate": null,
"ownership_model": "single",
"owner": "3F21SJs4FMpsakrxmd8GjgfQZG6BN6MVsvXcm5Yc6Jcf"
}
}
]
}
}