Skip to main content

LendingPosition

Position data for a single asset within a lending protocol.

marketUidstring

Unique market identifier (format: {lender}:{chainId}:{address})

Example: AAVE_V3:1:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
depositsstring

Deposit amount in token units (wei)

Example: 1000000000000000000
debtstring

Variable debt in token units

Example: 0
debtStablestring

Stable debt in token units

Example: 0
depositsUSDnumber

Deposits in USD

Example: 2500
debtUSDnumber

Variable debt in USD

Example: 0
debtStableUSDnumber

Stable debt in USD

Example: 0
collateralEnabledboolean

Whether this asset is enabled as collateral

Example: true
claimableRewardsnumber

Claimable rewards in USD

Example: 0.5
withdrawablestring

Max tokens withdrawable while maintaining health >= 1. Equals full deposit balance if collateral is not enabled.

Example: 0.5
borrowablestring

Max tokens borrowable against remaining credit line. Zero if borrowing is disabled, reserve is frozen, or debt is disabled for the active mode.

Example: 100
underlyingInfo object

Nested asset metadata, oracle prices, and market prices for a lending market.

asset object

Token metadata for an underlying asset.

chainIdstring
Example: 1
addressstring

Token contract address (lowercase)

Example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
symbolstring
Example: USDC
namestring
Example: USD Coin
decimalsintegernullable
Example: 6
logoURIstringnullable
assetGroupstringnullable

Canonical asset group (e.g. "USDC", "ETH", "BTC")

Example: USDC
currencyIdstringnullable
props objectnullable

Protocol-specific asset properties

property name*anynullable

Protocol-specific asset properties

oraclePrice object

On-chain oracle price data.

oraclePricenumbernullable

Raw on-chain oracle price

oraclePriceUsdnumbernullable

Oracle price denominated in USD

prices object

Market prices for an asset with 24h comparison.

priceUsdnumbernullable

Current price in USD

priceTsstring<date-time>nullable

Timestamp of current price

priceUsd24hnumbernullable

Price 24 hours ago in USD

priceTs24hstring<date-time>nullable

Timestamp of 24h-ago price

priceChange24hnumbernullable

Percentage price change over 24h

LendingPosition
{
"marketUid": "AAVE_V3:1:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"deposits": "1000000000000000000",
"debt": "0",
"debtStable": "0",
"depositsUSD": 2500,
"debtUSD": 0,
"debtStableUSD": 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
}
}
}