Skip to main content
The portfolio response returns a top level object with a timestamp, a sections object that reports indexing status and freshness for each product, and one array for each product section. Each position is returned already valued, with its own value and price included.
Run the endpoints live in the API playground: portfolio and pending rewards.

Parameters

Response object

Position fields by product

One entry per obligation. The tag field distinguishes the kind (Vanilla, Multiply, and so on). Multiply and leverage entries add depositMint and borrowMint.

Shared building blocks

Entries in deposits, borrows, and the liquidity tokenA / tokenB share a common shape, with a few context-specific extras.
Each product key in sections reports whether the wallet has data and how fresh it is. A section with indexed: false has no data for this wallet.

Pending rewards

GET /portfolio/{pubkey}/rewards returns pending farm rewards across products: a timestamp and a farms array. Each farm entry lists its pending rewards.

Examples

1

Calculate LTV and liquidation headroom for each lending position

Compare ltv against liquidationLtv to measure how close a position is to liquidation.
lendingPositions
2

List earn vault positions with shares and USD value

earnPositions
3

Check which product sections are stale or failed to load

Use sections to decide whether positions are stale or a product failed to load.
sectionFreshness
4

List pending farm rewards across all products

pendingRewards
5

Sum total portfolio value and break it down per product

Sum netValue from each section (and value for staking) for a portfolio total, then break it down per product.
totalValue

Calculate portfolio totals

The API returns valued positions but no portfolio-wide rollups, so you compose them:
  • Net worth: sum netValue across every section, except staking, which exposes value instead. Multiply and leverage netValue is already deposits minus borrows, so totals reflect real equity.
  • USD conversion: positions carry value and price, but for any raw amounts you price yourself, use the Oracle prices endpoint.