Skip to main content

Parse raw RPC responses into user positions with portfolio summary

POST 

/v1/data/lending/user-positions/parse

Accepts the raw multicall RPC responses obtained by executing the calls from /rpc-call and decodes them into structured user position data.

Workflow:

  1. Call /rpc-call to get prepared RPC calls and a rpcCallId
  2. Execute the RPC calls against your own node
  3. Send rpcCallId + rawResponses to this endpoint for parsing

The rpcCallId ties the responses back to the cached preparation context (valid for 5 minutes). After successful parsing the cached context is deleted.

Response Structure:

  • data: Flat array of lender entries sorted by net worth (descending). Each entry fuses sub-account position data with aggregated summary metrics (deposits, debt, APRs, health, leverage).
  • summary: Portfolio-wide totals (net worth, APRs, leverage, active counts) plus per-chain breakdowns.

Lender Entry includes:

  • Per-asset deposits and debt (in USD and token units)
  • Sub-account data with health factors and borrow capacity
  • Aggregated lender-level metrics (total deposits/debt, weighted APRs, health factor, leverage)
  • Collateral status, withdrawable/borrowable amounts per position

Portfolio Summary includes:

  • Total deposits, debt, and net worth (current + 24h ago) across all chains
  • Weighted average APRs and overall leverage ratio
  • Count of active lenders and chains
  • Per-chain totals (deposits, debt, net worth, lender count)

Request

Responses

Parsed user position data with portfolio summary