Explorer

Get Portfolio

Get the portfolio of a user.

The getPortfolio function retrieves the aggregated portfolio for the authenticated user.

Available on

Ethereum
Ethereum
Polygon
Polygon
Avalanche
Avalanche
Arbitrum
Arbitrum
BSC
BSC
Fantom
Fantom
Linea
Linea
Metis
Metis
Optimism
Optimism
Base
Base
Base Sepolia
Base Sepolia
HyperEVM Testnet
HyperEVM Testnet
Polygon Amoy
Polygon Amoy

To enable these chains for your application, please configure them in the Okto Dashboard.

Not available on

Method Overview

MethodsDescription
async getPortfolioGet the portfolio of a user

Get Portfolio

async getPortfolio(OktoClient) retrieves the user's aggregated portfolio data.

Parameters

ParameterTypeDescription
oktoClientOktoClientOkto client

Response

Success Response

Field NameTypeDescription
resultPromise<UserPortfolioData>Returns the portfolio of the user

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