Explorer
Get Portfolio
Get the portfolio of a user.
The getPortfolio function retrieves the aggregated portfolio for the authenticated user.
Available on
To enable these chains for your application, please configure them in the Okto Dashboard.
Not available on
Example
import { getPortfolio } from "@okto_web3/core-js-sdk/explorer";
const portfolio = await getPortfolio(oktoClient); Method Overview
| Methods | Description |
|---|---|
async getPortfolio | Get the portfolio of a user |
Get Portfolio
async getPortfolio(OktoClient) retrieves the user's aggregated portfolio data.
Parameters
| Parameter | Type | Description |
|---|---|---|
oktoClient | OktoClient | Okto client |
Response
Success Response
| Field Name | Type | Description |
|---|---|---|
result | Promise<UserPortfolioData> | Returns the portfolio of the user |
Note
In case of errors, debug the error using the error code and refer to the SDK errors and warnings documentation for more details.