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
Method | Description |
---|---|
async getPortfolioNFT | Get user's NFT holdings |
Get Portfolio NFT
async getPortfolioNFT(oktoClient: OktoClient)
retrieves the user's NFT portfolio data.
Parameters
Parameter | Type | Description |
---|---|---|
oktoClient | OktoClient | Instance of OktoClient obtained from useOkto hook |
Response
Success Response
Field Name | Type | Description |
---|---|---|
nfts | Promise<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.