Skip to content

Portfolio

Igor Sazonov edited this page Jul 14, 2026 · 1 revision

The Portfolio service provides a comprehensive view of a wallet's DeFi positions across protocols and chains.

Access it via client.Portfolio.

DeFi Holdings

DeFiHoldings returns a wallet's DeFi holdings, including deposits, stakes, borrows, and rewards across all supported protocols.

Endpoint: POST /api/v1/portfolio/defi-holdings

Request

type PortfolioDefiHoldingsRequest struct {
    WalletAddress string `json:"wallet_address"`
}

Example

resp, err := client.Portfolio.DeFiHoldings(ctx, &nansen.PortfolioDefiHoldingsRequest{
    WalletAddress: "0x0000000000000000000000000000000000000000",
})

Response

The response contains a top-level Summary and a list of Protocols.

Summary (HoldingsSummary):

Field Type Description
TotalValueUSD float64 Total portfolio value in USD.
TotalAssetsUSD float64 Total value of deposited/staked assets.
TotalDebtsUSD float64 Total value of borrowed positions.
TotalRewardsUSD float64 Total value of unclaimed rewards.
TokenCount int Number of distinct tokens in the portfolio.
ProtocolCount int Number of distinct protocols.

Protocol (ProtocolHolding):

Field Type Description
ProtocolName string Name of the DeFi protocol.
Chain string Blockchain the protocol is on.
TotalValueUSD float64 Total value of positions in this protocol.
TotalAssetsUSD float64 Value of assets deposited or staked.
TotalDebtsUSD float64 Value of borrowed positions.
TotalRewardsUSD float64 Value of unclaimed rewards.
Tokens []ProtocolToken Individual token positions within this protocol.

Token position (ProtocolToken):

Field Type Description
Address *string Token contract address.
Symbol *string Token ticker symbol.
Amount *float64 Amount of tokens.
ValueUSD *float64 Value in USD.
PositionType PositionType One of deposit, stake, borrow, or mixed.

Clone this wiki locally