getAssetsByGroup - Helius DAS API
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
POST
https://mainnet.helius-rpc.comhttps://devnet.helius-rpc.com
/
Try it
getAssetsByGroup
cURL
curl --request POST \
--url 'https://mainnet.helius-rpc.com/?api-key=' \
--header 'Content-Type: application/json' \
--data '\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "getAssetsByGroup",\n "params": {\n "groupKey": "collection",\n "groupValue": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w",\n "options": {\n "showUnverifiedCollections": false,\n "showCollectionMetadata": false,\n "showGrandTotal": false\n }\n }\n}\n'
Python
import requests
url = "https://mainnet.helius-rpc.com/?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetsByGroup",
"params": {
"groupKey": "collection",
"groupValue": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w",
"options": {
"showUnverifiedCollections": False,
"showCollectionMetadata": False,
"showGrandTotal": False
}
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
JavaScript
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: '1',
method: 'getAssetsByGroup',
params: {
groupKey: 'collection',
groupValue: 'J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w',
options: {
showUnverifiedCollections: false,
showCollectionMetadata: false,
showGrandTotal: false
}
}
})
};
fetch('https://mainnet.helius-rpc.com/?api-key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
$curl = curl_init();
curl_setopt_array($curl, [\
CURLOPT_URL => "https://mainnet.helius-rpc.com/?api-key=",\
CURLOPT_RETURNTRANSFER => true,\
CURLOPT_ENCODING => "",\
CURLOPT_MAXREDIRS => 10,\
CURLOPT_TIMEOUT => 30,\
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
CURLOPT_CUSTOMREQUEST => "POST",\
CURLOPT_POSTFIELDS => json_encode([\
'jsonrpc' => '2.0',\
'id' => '1',\
'method' => 'getAssetsByGroup',\
'params' => [\
'groupKey' => 'collection',\
'groupValue' => 'J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w',\
'options' => [\
'showUnverifiedCollections' => false,\
'showCollectionMetadata' => false,\
'showGrandTotal' => false\
]\
]\
]),\
CURLOPT_HTTPHEADER => [\
"Content-Type: application/json"\
],\
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mainnet.helius-rpc.com/?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetsByGroup\",\n \"params\": {\n \"groupKey\": \"collection\",\n \"groupValue\": \"J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w\",\n \"options\": {\n \"showUnverifiedCollections\": false,\n \"showCollectionMetadata\": false,\n \"showGrandTotal\": false\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Java
HttpResponse<String> response = Unirest.post("https://mainnet.helius-rpc.com/?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetsByGroup\",\n \"params\": {\n \"groupKey\": \"collection\",\n \"groupValue\": \"J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w\",\n \"options\": {\n \"showUnverifiedCollections\": false,\n \"showCollectionMetadata\": false,\n \"showGrandTotal\": false\n }\n }\n}")
.asString();
Ruby
require 'uri'
require 'net/http'
url = URI("https://mainnet.helius-rpc.com/?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetsByGroup\",\n \"params\": {\n \"groupKey\": \"collection\",\n \"groupValue\": \"J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w\",\n \"options\": {\n \"showUnverifiedCollections\": false,\n \"showCollectionMetadata\": false,\n \"showGrandTotal\": false\n }\n }\n}"
response = http.request(request)
puts response.read_body
Response
Successful response
{
"jsonrpc": "2.0",
"result": {
"last_indexed_slot": 365750752,
"total": 1,
"limit": 1,
"page": 1,
"items": [
{
"interface": "ProgrammableNFT",
"is_agent": true,
"agent_token": "<string>",
"asset_signer": "<string>",
"plugins": {},
"id": "JEGruwYE13mhX2wi2MGrPmeLiVyZtbBptmVy9vG3pXRC",
"authorities": "<array>",
"compression": {},
"grouping": "<array>",
"royalty": {},
"creators": "<array>",
"ownership": {},
"supply": {},
"mutable": true,
"burnt": false
}
]
}
}
Error responses
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Invalid request parameters."
},
"id": "1"
}
{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "Authentication failed. Missing or invalid API key."
},
"id": "1"
}
{
"jsonrpc": "2.0",
"error": {
"code": -32003,
"message": "You do not have permission to access this resource."
},
"id": "1"
}
{
"jsonrpc": "2.0",
"error": {
"code": -32004,
"message": "No assets found for the specified group."
},
"id": "1"
}
{
"jsonrpc": "2.0",
"error": {
"code": -32029,
"message": "Rate limit exceeded. Please try again later."
},
"id": "1"
}
{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "An unexpected error occurred on the server."
},
"id": "1"
}
Request Parameters
groupKey
- string
- required
The Solana group classification type to search by (e.g., ‘collection’, ‘community’, ‘creator’, etc.).
groupValue
- string
- required
The Solana collection address or group identifier to retrieve all matching NFTs for.
page
- number
The page number for paginating through the Solana collection results.
limit
- number
The maximum number of Solana NFTs to return per request from this collection.
sortBy
- object
The sorting options for the response.
sortBy.sortBy
- string
The criteria by which the retrieved Solana NFTs in the collection will be sorted.
createdrecent_actionupdatednone
sortBy.sortDirection
- string
The direction by which the retrieved Solana NFTs in the collection will be sorted.
ascdesc
before
- string
The cursor for paginating backwards through the assets.
after
- string
The cursor for paginating forwards through the assets.
options
- object
The display options for the response.
options.showUnverifiedCollections
boolean
default:"false"
Displays grouping information for unverified collections instead of skipping them.
options.showCollectionMetadata
boolean
default:"false"
Displays metadata for the collection.
options.showGrandTotal
boolean
default:"false"
Shows the total number of assets that matched the query. This will make the request slower.
Authorizations
api-key
- string
- query
- required
Your Helius API key. You can get one for free in the dashboard.
Body
- application/json
jsonrpc
- enum
- default:2.0
- required
The version of the JSON-RPC protocol.
Available options:
2.0
id
- string
- default:1
- required
An ID to identify the request.
method
- enum
- default:getAssetsByGroup
- required
The name of the DAS method to invoke.
Available options:
getAssetsByGroup
params
- object
- required
Show child attributes
Response
200
application/json
Successful response
jsonrpc
- string
Example:
"2.0"
result
- object
Show child attributes