User positions (index-hinted, experimental)
GET/v1/data/lending/user-positions/hinted
The same response as /v1/data/lending/user-positions, reading only the lenders the position index says the wallet can hold. Every value is still read live on chain; the index only narrows WHICH lenders are queried.
Per chain, the index answers whether its hint is usable. Only then is the read narrowed to the lenders the wallet's last full read found, the ones it entered since, and every lender the index cannot observe. Otherwise — no full read on record, the index behind it, an unfollowed chain, the index slow or unreachable, or an explicit lenders= — the chain is read in full, exactly as the plain route does.
The response adds hints: { ms, chains: { [chainId]: { mode: 'hinted' | 'full', reason, lenders? } } }.
Plain-text reference — GET /v1/data/lending/user-positions/hinted
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
account | query | string | yes | EVM account address (0x-prefixed, 40 hex chars) |
chains | query | string | yes | Comma-separated chain IDs |
lenders | query | string | no | Comma-separated lender IDs. When given, the index is not consulted. See the LenderId schema for the full set of accepted values. |
Response 200
| Field | Type | Description |
|---|---|---|
success | True | |
data | object | User lending positions as a flat array with portfolio summary and per-chain breakdowns. |
data.items | object[] | Flat array of lender entries sorted by net worth (descending). Each entry fuses position data with aggregated summary metrics. |
data.items[].lender | string | Lender identifier |
data.items[].chainId | string | Chain ID |
data.items[].account | string | User account address |
data.items[].data | object[] | Sub-account position data |
data.items[].data[].accountId | string | Sub-account identifier (e.g., "0" for default, NFT ID for Init) |
data.items[].data[].health | number | Health factor (null if no debt). Values > 1 are healthy, < 1 at risk of liquidation. |
data.items[].data[].borrowCapacityUSD | number | Total USD borrowable while maintaining health >= 1 |
data.items[].data[].balanceData | object | Aggregated balance data for a sub-account. |
data.items[].data[].aprData | object | APR breakdown for a sub-account. |
data.items[].data[].positions | object[] | Individual asset positions in this sub-account |
data.items[].data[].userConfig | object | User configuration for a sub-account. |
data.items[].balanceData | object | Summary-level balance data (without discounted/adjusted fields). |
data.items[].balanceData.deposits | number | Total deposits in USD |
data.items[].balanceData.debt | number | Total debt in USD |
data.items[].balanceData.collateral | number | Collateral value in USD |
data.items[].balanceData.collateralAllActive | number | Collateral if all assets were enabled |
data.items[].balanceData.nav | number | Net asset value (deposits - debt) |
data.items[].balanceData.deposits24h | number | Deposits 24h ago |
data.items[].balanceData.debt24h | number | Debt 24h ago |
data.items[].balanceData.nav24h | number | NAV 24h ago |
data.items[].balanceData.rewards | object[] | Pending reward token claims. Each entry represents a single reward program. |
data.items[].aprData | object | Summary-level APR breakdown. |
data.items[].aprData.apr | number | Net APR (deposit - borrow) |
data.items[].aprData.depositApr | number | Weighted deposit APR |
data.items[].aprData.borrowApr | number | Weighted borrow APR |
data.items[].aprData.rewardApr | number | Total reward APR |
data.items[].aprData.rewardDepositApr | number | Reward APR on deposits |
data.items[].aprData.rewardBorrowApr | number | Reward APR on borrows |
data.items[].aprData.intrinsicApr | number | Intrinsic yield APR (e.g., stETH staking) |
data.items[].aprData.intrinsicDepositApr | number | Intrinsic yield APR portion from deposits |
data.items[].aprData.intrinsicBorrowApr | number | Intrinsic yield APR portion from borrows |
data.items[].aprData.rewards | object | Per-reward-token APR breakdown. Keys are reward token addresses. |
data.items[].leverage | number | Leverage ratio (deposits / nav) |
data.summary | object | Portfolio-wide totals with per-chain breakdowns. Per-lender summaries are fused into each LenderDataEntry in the items array. |
data.summary.balanceData | object | Summary-level balance data (without discounted/adjusted fields). |
data.summary.balanceData.deposits | number | Total deposits in USD |
data.summary.balanceData.debt | number | Total debt in USD |
Request
Responses
- 200
- 400
- 429
- 500
- 502
User position data with portfolio summary
Validation error
Rate limited. Unauthenticated callers share a per-IP budget; send an x-api-key header to lift it. Retry with exponential backoff.
Unexpected server error. Safe to retry with backoff.
An upstream data source or protocol origin failed (error.code is ORIGIN_FAILED). error.details carries the per-origin status. This is also what a missing or malformed required parameter currently returns, rather than a 400.