Track Positions - Lending Wallets

This API retrieves the balances of a given address within supported lending protocols.

Potential Use-Cases

You can visualize an EOA's latest and historic positions.

Sample Visualization

The responses from this endpoint can be visualized like this

Response Data

The table below will help you understand the contents of payload.data in the API response.

Field

Type

Description

timestamp

number

The instant in time when this portfolio snapshot was taken.

totalLiquidityETH

number

The total amount deposited into the protocol by the wallet/address as measured in ETH.

This value will always be >= totalCollateralETH since not all deposited assets need to be used as collateral.

totalLiquidityUSD

number

The total amount deposited into the protocol by the wallet/address as measured in USD.

This value will always be >= totalCollateralUSD since not all deposited assets need to be used as collateral.

totalCollateralETH

number

The total amount of collateral that this wallet/address has supplied to the protocol as measured in ETH.

totalCollateralUSD

number

The total amount of collateral that this wallet/address has supplied to the protocol as measured in USD.

totalBorrowedETH

number

The total amount borrowed by this wallet/address as measured in ETH.

totalBorrowedUSD

number

The total amount borrowed by this wallet/address as measured in USD.

availableToBorrowETH

number

The total amount that can still be borrowed by this wallet/address as measured in ETH.

availableToBorrowUSD

number

The total amount that can still be borrowed by this wallet/address as measured in USD.

netWorthETH

number

The difference between totalCollateralETH and totalBorrowedETH.

netWorthUSD

number

The difference between totalCollateralUSD and totalBorrowedUSD.

lifetimeRewardsETH

number

Total amount of protocol incentives generated by this address for participating in the protocol, as measured in ETH.

lifetimeRewardsUSD

number

Total amount of protocol incentives generated by this address for participating in the protocol, as measured in USD.

unclaimedRewardsETH

number

Total amount of protocol incentives that have not yet been claimed by this address as measured in ETH.

unclaimedRewardsUSD

number

Total amount of protocol incentives that have not yet been claimed by this address as measured in USD.

healthFactor

number

A risk metric that indicates how close this wallet/address is to being liquidated within the protocol.

A value <= 1 indicates that the wallet/address will be liquidated.

  • *Note**: This metric is unique to Aave.

loanToValueRatio

number

The maximum loan value for this wallet/address. Ranges from 0 to 1.

liquidationThresholdRatio

number

The limit at which this wallet/address is considered undercollateralized. Ranges from 0 to 1.

positions

array

The collection of all lending and borrowing positions that this address holds, broken down by asset.

positions[index].assetId

string

The smart contract address for the asset.

positions[index].assetSymbol

string

The human readable asset symbol.

positions[index].positionType

string (Lend | Borrow)

Indicates whether this asset is being lent or borrowed.

positions[index].isCollateral

boolean

Indicates whether this asset is being used as collateral or not.

positions[index].loanToValueRatio

number

The maximum loan value for this asset.

positions[index].liquidationThresholdRatio

number

Defines the limit at which a position is considered undercollateralized.

positions[index].amountNative

number

The amount of this asset in this position, normalized with its decimals.

positions[index].amountUSD

number

The amount of this asset in this position as measured in USD.

positions[index].interestRateAPY

number

Multiply this value by 100 to get interest rate as a percentage.

Example: "interestRateAPY": 0.038774376844581834

Should be interpreted as 3.877%.

positions[index].interestRateType

string (Variable | Stable)

Denotes the interest rate type, either Variable or Stable.

positions[index].market

string

Indicates what market the asset positions belongs to.

  • *Note**: This is unique to MakerDAO.

positions[index].duration

number

The number of days the position has been open.

📘

totalLiquidity* in Compound v3

Only the market (base) asset will be considered as liquidity. All other deposited assets are considered collateral. So it is possible for an EOA to have zero liquidity and non-zero collateral.

A common scenario where this happens is when an EOA only has Borrow positions of a market asset and has never deposited any of the market asset.

Language
Credentials
Header
Click Try It! to start a request and see the response here!