GetUserReserveData

Aave V2 Getter Plugin - GetUserReserveData

Description

Returns the user's reserve data for asset.

Method

getUserReserveData(address, address)

Input Parameters

No required input parameters

Method Parameters

NamePlugin TypeDescription

asset

FctAddress

Address of asset

user

FctAddress

Address of user

Returned Values

NamePlugin TypeDescription

currentATokenBalance

FctValue

Current aToken balance of user

currentStableDebt

FctValue

Current stable debt the user

currentVariableDebt

FctValue

Current variable debt of the user

principalStableDebt

FctValue

The principal stable debt of the user

scaledVariableDebt

FctValue

The scaled variable debt of the user

stableBorrowRate

FctBoolean

The stable borrow rate of the user

liquidityRate

FctBoolean

The interest rate being earned by the user for deposits

stableRateLastUpdated

FctValue40

The timestamp of the last stable rate update

usageAsCollateralEnabled

FctBoolean

Whether the reserve is enabled as collateral for the user

Example

Example with initParams

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

Example without initParams

const getUserReserveData = new AaveV2.getter.GetUserReserveData({ 
   chainId: 1 
})

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

Learn more

Learn more about Aave V2 get user reserve data method here

Last updated