Get Assets by Owner
Get a list of assets owned by an address.
This will return a list of assets for the given owner. This can define compressed or standard NFTs.
This method is the fastest way to return ALL NFTs belonging to a user.
The
page
parameter in the request starts at 1 . post
https://rpc.helius.xyz
/?api-key=<api_key>
getAssetsByOwner
Get Assets by Owner will return all NFTs from a user, this can be used to create:
- A wallet tracker
- NFT portfolio viewer
- Token gated dApp
Toly.sol Wallet
const url = `https://rpc.helius.xyz/?api-key=<api_key>`
const getAssetsByOwner = async () => {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'my-id',
method: 'getAssetsByOwner',
params: {
ownerAddress: '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
page: 1, // Starts at 1
limit: 1000
},
}),
});
const { result } = await response.json();
console.log("Assets by Owner: ", result.items);
};
getAssetsByOwner();
Last modified 10d ago