Explorer

Get Portfolio NFTs

Learn how to retrieve a user's NFT holdings using the Okto SDK.

The getPortfolioNFT function retrieves all NFTs owned by the user across supported chains.

Note

This function is currently not supported for the following chains:

  • Base Sepolia
  • HyperEVM

Method Overview

MethodDescription
async getPortfolioNFTGet user's NFT holdings

Get Portfolio NFT

async getPortfolioNFT(oktoClient: OktoClient) retrieves the user's NFT portfolio data.

Parameters

ParameterTypeDescription
oktoClientOktoClientInstance of OktoClient obtained from useOkto hook

Response

Success Response

Field NameTypeDescription
nftsPromise<NFTData[]>Array of user's NFT holdings

Example

Note

In case of errors, debug the error using the error code and refer to the SDK errors and warnings documentation for more details.

On this page