GetUserAccountData

Aave V2 Getter Plugin - GetUserAccountData

Description

Returns the user account data across all the reserves

Method

getUserAccountData(address)

Input Parameters

No required input parameters

Method Parameters

NamePlugin TypeDescription

user

FctAddress

Address of user

Returned Values

NamePlugin TypeDescription

totalCollateralETH

FctValue

Total collateral in ETH of the use (wei decimal unit)

totalDebtETH

FctValue

Total debt in ETH of the user (wei decimal unit)

availableBorrowsETH

FctValue

Borrowing power left of the user (wei decimal unit)

currentLiquidationThreshold

FctValue

Liquidation threshold of the user. (1e4 format => percentage plus two decimals)

ltv

FctValue

Loan To Value of the user (1e4 format => percentage plus two decimals)

healthFactor

FctValue

Current health factor of the user.

Example

Example with initParams

const getUserAccountData = new AaveV2.getter.GetUserAccountData({
   chainId: 1,
   initParams: {
     methodParams: {
       user: "0x...",
     }
   }
})

Example without initParams

const getUserAccountData = new AaveV2.getter.GetUserAccountData({ chainId: 1 })

getUserAccountData.input.set({
    methodParams: {
       user: "0x...",
    }
})

Learn more

Learn more about Aave V2 getUserAccountData method here

Last updated