UserSubAccount
Position data for a single sub-account within a lender.
Sub-account identifier (e.g., "0" for default, NFT ID for Init)
0Health factor (null if no debt). Values > 1 are healthy, < 1 at risk of liquidation.
1.85Total USD borrowable while maintaining health >= 1
3000balanceData objectrequired
Aggregated balance data for a sub-account.
Total deposits in USD
10000.5Total debt in USD
5000.25Debt adjusted for borrow factors
5500Collateral value in USD
9000Collateral if all assets were enabled
10000.5Collateral discounted by borrow factors
8000Discounted collateral if all enabled
9000Net asset value (deposits - debt)
5000.25Deposits 24h ago (for change calculation)
9800Debt 24h ago
4900NAV 24h ago
4900rewards object[]nullable
Pending reward token claims. Each entry represents a single reward program.
Reward token contract address
0xc00e94Cb662C3520282E6f5717214004A7f26888Total accumulated rewards (token units)
12.5Immediately claimable rewards (token units)
12.5aprData objectrequired
APR breakdown for a sub-account.
Net APR (deposit - borrow)
2.5Weighted deposit APR
3.5Weighted borrow APR
5.2Total reward APR
1.2Reward APR on deposits
0.8Reward APR on borrows
0.4Intrinsic yield APR (e.g., stETH staking)
0Intrinsic yield APR portion from deposits
0Intrinsic yield APR portion from borrows
0rewards object
Per-reward-token APR breakdown. Keys are reward token addresses.
property name* RewardAprBreakdown
APR breakdown for a single reward token.
Net reward APR (normalized to NAV)
0.045Reward APR on borrows
0.012Reward APR on deposits
0.078positions object[]required
Individual asset positions in this sub-account
Unique market identifier (format: {lender}:{chainId}:{address})
AAVE_V3:1:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2Deposit amount in token units (wei)
1000000000000000000Variable debt in token units
0Stable debt in token units
0Debt share amount (protocol-specific, present when the protocol uses share-based accounting)
0Deposit share amount (protocol-specific, present when the protocol uses share-based accounting)
0Deposits in USD (market price)
2500Variable debt in USD (market price)
0Stable debt in USD (market price)
0Deposits in USD using on-chain oracle price (used for risk/health calculations)
2510Variable debt in USD using on-chain oracle price
0Stable debt in USD using on-chain oracle price
0Whether this asset is enabled as collateral
trueClaimable rewards in USD
0.5Max tokens withdrawable while maintaining health >= 1. Equals full deposit balance if collateral is not enabled.
0.5Max tokens borrowable against remaining credit line. Zero if borrowing is disabled, reserve is frozen, or debt is disabled for the active mode.
100underlyingInfo object
Nested asset metadata, oracle prices, and market prices for a lending market.
asset object
Token metadata for an underlying asset.
1Token contract address (lowercase)
0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48USDCUSD Coin6Canonical asset group (e.g. "USDC", "ETH", "BTC")
USDCprops objectnullable
Protocol-specific asset properties
Protocol-specific asset properties
oraclePrice object
On-chain oracle price data.
Raw on-chain oracle price
Oracle price denominated in USD
prices object
Market prices for an asset with 24h comparison.
Current price in USD
Timestamp of current price
Price 24 hours ago in USD
Timestamp of 24h-ago price
Percentage price change over 24h
userConfig objectrequired
User configuration for a sub-account.
Mode/config key (e.g. e-mode category or vault address)
0Config identifier
0Whether user is whitelisted (for permissioned markets)
{
"accountId": "0",
"health": 1.85,
"borrowCapacityUSD": 3000,
"balanceData": {
"deposits": 10000.5,
"debt": 5000.25,
"adjustedDebt": 5500,
"collateral": 9000,
"collateralAllActive": 10000.5,
"borrowDiscountedCollateral": 8000,
"borrowDiscountedCollateralAllActive": 9000,
"nav": 5000.25,
"deposits24h": 9800,
"debt24h": 4900,
"nav24h": 4900,
"rewards": [
{
"asset": "0xc00e94Cb662C3520282E6f5717214004A7f26888",
"totalRewards": 12.5,
"claimableRewards": 12.5
}
]
},
"aprData": {
"apr": 2.5,
"depositApr": 3.5,
"borrowApr": 5.2,
"rewardApr": 1.2,
"rewardDepositApr": 0.8,
"rewardBorrowApr": 0.4,
"intrinsicApr": 0,
"intrinsicDepositApr": 0,
"intrinsicBorrowApr": 0,
"rewards": {}
},
"positions": [
{
"marketUid": "AAVE_V3:1:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"deposits": "1000000000000000000",
"debt": "0",
"debtStable": "0",
"debtShares": "0",
"depositShares": "0",
"depositsUSD": 2500,
"debtUSD": 0,
"debtStableUSD": 0,
"depositsUSDOracle": 2510,
"debtUSDOracle": 0,
"debtStableUSDOracle": 0,
"collateralEnabled": true,
"claimableRewards": 0.5,
"withdrawable": "0.5",
"borrowable": "100",
"underlyingInfo": {
"asset": {
"chainId": "1",
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"logoURI": "string",
"assetGroup": "USDC",
"currencyId": "string",
"props": {}
},
"oraclePrice": {
"oraclePrice": 0,
"oraclePriceUsd": 0
},
"prices": {
"priceUsd": 0,
"priceTs": "2024-07-29T15:51:28.071Z",
"priceUsd24h": 0,
"priceTs24h": "2024-07-29T15:51:28.071Z",
"priceChange24h": 0
}
}
}
],
"userConfig": {
"selectedMode": "0",
"id": "0",
"isWhitelisted": true
}
}