All NFTs

View all NFTs owned by a wallet using the getAssetsByOwner DAS API. Includes standard NFTs, programmable NFTs (pNFTs), and collection metadata.

Try It

Code Example

// Get all NFTs for a wallet address
import { Helius } from 'helius-sdk';

const helius = new Helius('YOUR_API_KEY');

async function getNFTs(ownerAddress: string) {
const response = await helius.rpc.getAssetsByOwner({
ownerAddress,
page: 1,
limit: 1000,
displayOptions: {
showFungible: false,
showCollectionMetadata: true,
},
});

// Filter for NFT interfaces only
const nftInterfaces = ['V1_NFT', 'V1_PRINT', 'V2_NFT', 'ProgrammableNFT'];

return response.items
.filter(asset => nftInterfaces.includes(asset.interface))
.map(asset => ({
id: asset.id,
name: asset.content?.metadata?.name || 'Unnamed NFT',
image: asset.content?.files?.[0]?.cdn_uri || asset.content?.files?.[0]?.uri,
compressed: asset.compression?.compressed || false,
}));
}

// Usage
const nfts = await getNFTs('86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY');
console.log(`Found ${nfts.length} NFTs`);

API Tips

  • Interface filtering: NFTs use interfaces like V1_NFT, ProgrammableNFT, V2_NFT.
  • CDN images: Prefer cdn_uri over raw uri for faster image loading.
  • Pagination: Use page and limit for wallets with many assets.

Frequently Asked Questions

How do I list all NFTs in a Solana wallet?
Use the getAssetsByOwner DAS API with the wallet address. Filter the response for NFT interfaces like V1_NFT, V2_NFT, and ProgrammableNFT to get only NFTs.
What is the difference between V1_NFT and ProgrammableNFT?
V1_NFT is the original Metaplex standard. ProgrammableNFT (pNFT) adds on-chain rules like enforced royalties. Both are returned by getAssetsByOwner - check the interface field to distinguish them.
How do I get faster image loading for NFTs?
Use the cdn_uri field instead of the raw uri. Helius provides CDN-cached images that load faster and more reliably than fetching directly from IPFS or Arweave.