getAssetsByOwner
https://api.triport.io/Returns every Digital Asset Standard (DAS) asset — NFTs, compressed NFTs, and fungible tokens — owned by a given Solana wallet.
getAssetsByOwner is a Digital Asset Standard (DAS) read method. Given a wallet
address it returns the full set of assets that wallet owns — standard NFTs,
compressed NFTs (cNFTs), and, where indexed, fungible token positions — in a
single paginated call. Use it to render a wallet's portfolio or collection view
without issuing one lookup per mint.
Because the result set for an active wallet can be large, responses are
paginated. Request one page at a time and walk forward until a page returns
fewer items than the requested limit.
This method belongs to the sol_das tier category and therefore requires at
least a basic tier API key; free-tier keys are rejected with an
authorization error (see Errors).
Parameters
JSON-RPC params is a single object (named parameters).
ownerAddressstringrequiredpageintegeroptional1.limitintegeroptionalsortByobjectoptionalResponse
The
resultis an object. The example above shows the shape DAS clients expect (total,limit,page, and anitemsarray of asset objects); the precise asset object schema is finalized inapi.2.2+.
resultobjectresult.totalintegerresult.limitintegerlimit that was applied.result.pageintegerresult.itemsarrayErrors
Errors use the standard JSON-RPC error envelope. See errors.md for the full envelope and shared codes.
| Code | Meaning | When it happens |
|---|---|---|
401 | Unauthorized | Missing or invalid Authorization bearer token. |
403 | Forbidden | Key is below the required basic tier, or lacks the sol_das scope. |
-32602 | Invalid params | ownerAddress is missing or not a valid base-58 address. |
429 | Too many requests | Tier RPS exceeded; retry after backing off. |
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "getAssetsByOwner",
params: {
ownerAddress: "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
page: 1,
limit: 100,
},
}),
});
const { result } = await res.json();
console.log(result.items);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
const result = await client.solana.getAssetsByOwner({
ownerAddress: "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
page: 1,
limit: 100,
});
console.log(result.items);Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
result = client.solana.get_assets_by_owner(
owner_address="86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
page=1,
limit=100,
)
print(result["items"])Notes
- Pagination: start at
page: 1and increment until a page returns fewer thanlimititems. Keeplimitconstant across the walk. - Tier:
sol_dasmethods require a basic tier key or higher. Free-tier keys are rejected (403). - Provisional contract: parameter and result schemas are finalized in spec
version
api.2.2+. Pin to that version once published to rely on field names beyondownerAddress,page, andlimit. - Related DAS methods:
getAsset,getAssetProof,getAssetsByGroup.