Skip to main content

User positions

GET 

/v1/data/lending/user-positions

Fetches lending and borrowing positions for a given account across one or more chains.

Response Structure:

  • items: 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)

The server executes RPC calls internally and returns fully parsed results.


Using with action endpoints (POST simulation):

All action endpoints (/v1/actions/lending/*, /v1/actions/loop/*) accept an optional POST body for post-trade simulation. The data comes directly from this endpoint:

// 1. Fetch positions
GET /v1/data/lending/user-positions?account=0x...&chains=1

// 2. Pick the lender entry + sub-account you're acting on
const sub = response.data.items[i].data[j]

// 3. POST to any action endpoint with the same query params as GET, plus:
POST /v1/actions/lending/deposit?marketUid=AAVE_V3:1:0x...&amount=1000000
{
"balanceData": sub.balanceData,
"aprData": sub.aprData,
"positions": sub.positions,
"modeId": sub.userConfig.selectedMode
}

// 4. Response includes a "simulation" field with pre/post health factor,
// borrow capacity, and projected balanceData/aprData.

See the SimulationBody schema for full details.

Request

Responses

User position data with portfolio summary