TriportRPC

getAssetsByGroup

POSThttps://api.triport.io/sol

Look up every Digital Asset Standard (DAS) asset that belongs to a group — most commonly all NFTs in a collection.

Solana— (gated by tier, not scope)**basic+** required; category sol_das (see [Rate Limits](../../rate-limits.md))

getAssetsByGroup is a Digital Asset Standard (DAS) read method. Given a group key and value, it returns every asset assigned to that group. By far the most common use is enumerating an NFT collection: pass the group key collection and the collection's mint address to page through all assets that belong to it.

This is a basic-tier method. DAS methods (category sol_das) are not available on the free tier — calling them with a free-tier key returns a tier_insufficient error (see Errors). Upgrade to basic or higher to use it.

Because the result set for a popular collection can be large, the method is paginated. Request one page at a time and continue until a page returns fewer items than your requested limit.

Parameters

DAS methods take a single object parameter (named-object form). The intended fields are:

groupKeystringrequired
The group dimension to match on. The supported value is "collection".
groupValuestringrequired
The value for that group — for collection, the collection mint address (base-58).
pageintegeroptional
1-based page number to fetch. Defaults to 1.
limitintegeroptional
Max assets per page. Defaults to 1000.
sortByobjectoptional
Sort options, e.g. { "sortBy": "created", "sortDirection": "asc" }.
before / afterstringoptional
Cursor bounds for cursor-style pagination, as an alternative to page.

Response

A successful call returns a paginated list of assets:

result.totalinteger
Number of items returned on this page.
result.limitinteger
The page size used for this response.
result.pageinteger
The 1-based page number returned.
result.itemsarray
The assets in this page. Each entry is a DAS asset object.
result.items[].idstring
The asset's mint / ID (base-58).
result.items[].interfacestring
Asset interface type, e.g. V1_NFT.
result.items[].groupingarray
Group memberships; includes the queried group_key / group_value.
result.items[].ownershipobject
Owner address and delegation/frozen flags.

Errors

Errors are returned as a standard JSON-RPC error envelope. The cases most relevant to this method:

CodeMeaningWhen it happens
-32002tier_insufficient (HTTP 403)Called with a free-tier key — getAssetsByGroup requires basic tier or higher.
-32003rate_limited (HTTP 429)Sustained RPS for the sol_das category exceeded; honor the Retry-After header.
-32602Invalid paramsgroupKey / groupValue missing or malformed.
-32601method_unknown (HTTP 403)Method name misspelled or not part of the Solana product.

Example tier_insufficient response (free tier calling a DAS method):

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32002,
    "message": "Method 'getAssetsByGroup' requires basic tier or higher",
    "data": {
      "current_tier": "free",
      "required_tier": "basic",
      "method": "getAssetsByGroup",
      "category": "sol_das",
      "upgrade_url": "https://triport.io/upgrade/basic"
    }
  }
}

See the Errors page for the full envelope and the typed error schemas.

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io/sol", {
  method: "POST",
  headers: {
    "x-token": process.env.TRIPORT_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getAssetsByGroup",
    params: {
      groupKey: "collection",
      groupValue: "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w",
      page: 1,
      limit: 1000,
    },
  }),
});


const { result } = await res.json();
console.log(`page ${result.page}: ${result.items.length} assets`);

TypeScript SDK (@triport/sdk)

import { Triport } from "@triport/sdk";


const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });


const collection = "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w";
const page = await triport.sol.rpc("getAssetsByGroup", {
  groupKey: "collection",
  groupValue: collection,
  page: 1,
  limit: 1000,
});


console.log(`page ${page.page}: ${page.items.length} assets`);

Python (triport-sdk)

import os
from triport import Triport


triport = Triport(api_key=os.environ["TRIPORT_API_KEY"])


page = triport.sol.rpc("getAssetsByGroup", {
    "groupKey": "collection",
    "groupValue": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w",
    "page": 1,
    "limit": 1000,
})


print(f"page {page['page']}: {len(page['items'])} assets")

Notes

  • Pagination. Keep incrementing page until a response returns fewer than limit items — that page is the last one. For large collections, prefer the cursor form (before / after) if you need stable iteration while the collection changes.
  • Tier gate. This is a sol_das method, so a basic-tier (or higher) key is required; free-tier keys get -32002. See Rate Limits for the per-tier RPS budget on the sol_das category.
  • Related DAS methods: getAsset (single asset), getAssetProof (merkle proof for compressed assets), and getAssetsByOwner (assets held by a wallet).
  • Schema finalization. This page documents the intended contract while the method is a scaffold. When the api.2.2+ schema lands, re-check parameter defaults and the full asset object shape against the updated reference.