Aave V3

/getpool

Get the lend and borrow APY for the given pool from AAVE protocol.

GET https://api.expand.network/lendborrow/getpool

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendborrowId*

String

Refer to the Lend and Borrow ID page for details.

asset*

String

Token address to get the details of.

https://api.expand.network/lendborrow/getpool?lendborrowId=1200&asset=0x6b175474e89094c44da98b954eedeac495271d0f

/getpools

Get the list of supply and borrow APYs of the mentioned assets.

GET https://api.expand.network/lendborrow/getpools

Query Parameters

Name
Type
Description

lendborrowId*

String

Refer to the lend borrow Id page for details.

assets*

String

Comma-separated values of token address.

user

String

The public address of the sender.

rpc

String

Remote procedural call URL.

/getuseraccountdata

Get the repay, borrow, and withdraw amount details for the given user.

GET https://api.expand.network/lendborrow/getuseraccountdata

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendborrowId*

String

Refer to the lend borrow Id page for details.

asset*

String

Token address.

address*

String

Public address of sender.

interestRateMode*

String

Interest mode as per Aave. Is set '1' as default.

/borrow

Trigger the borrow transaction from the given protocol.

POST https://api.expand.network/lendborrow/borrow

Request Body

Name
Type
Description

lendborrowId*

String

Refer to the Lend and Borrow ID page for details.

asset*

String

Token address to borrow.

amount*

String

Number of tokens to be borrowed.

interestRateMode

String

Interest mode as per Aave. 0 for static and 1 for variable.

referralCode

String

Referral code needed by Aave.

onBehalfOf*

String

Required in case borrow need to be done on behalf of other public address.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for transaction.

rpc

String

Remote procedural call URL.

gasPriority

String

low, medium, or high.

With gasPriority (low):

/deposit

Trigger the deposit transaction from the given protocol.

POST https://api.expand.network/lendborrow/deposit

Request Body

Name
Type
Description

lendborrowId*

String

Refer to the Lend and Borrow ID page for details.

asset*

String

Token address to deposit.

amount*

String

Number of tokens to deposit.

referralCode*

String

Referral code needed by Aave.

onBehalfOf*

String

Required in case deposit need to be done on behalf of other public address.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for the transaction.

rpc

String

Remote procedural call URL.

involveBaseToken

String

0 for any ERC-20 token, 1 for ETH.

gasPriority

String

low, medium, or high.

With gasPriority (medium):

/liquidate

Trigger the liquidate transaction from the given protocol.

POST https://api.expand.network/lendborrow/liquidate

Request Body

Name
Type
Description

lendborrowId*

String

Refer to the Lend and Borrow ID page for details.

collateralAsset*

String

Address of the collateral token.

debtAsset*

String

Address of the debt token.

user*

String

Public address of the user whose account need to be liquidated.

debtToCover*

String

Amount of debt to be covered.

receiveAToken*

String

Amount of token A to be received.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for the transaction.

rpc

String

Remote procedural call URL.

/repay

Trigger the repay transaction from the given protocol.

POST https://api.expand.network/lendborrow/repay

Request Body

Name
Type
Description

lendborrowId*

String

Refer to the Lend and Borrow ID page for details.

asset*

String

Token address to repay.

interestRateMode

String

Interest mode as per Aave. 0 for static and 1 for variable.

onBehalfOf*

String

Required in case repay need to be done on behalf of other public address.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for the transaction.

rpc

String

Remote procedural call URL.

amount*

String

Amount to repay.

gasPriority

String

low, medium, or high.

With gasPriority (low):

/withdraw

Trigger the withdraw transaction from the given protocol.

POST https://api.expand.network/lendborrow/withdraw

Request Body

Name
Type
Description

lendborrowId*

String

Refer to the Lend and Borrow ID page for details.

asset*

String

Token address to be withdraw.

amount*

String

Number of tokens to withdraw.

to*

String

Recipient public address.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for the transaction.

rpc

String

Remote procedural call URL.

gasPriority

String

low, medium, or high.

With gasPriority:

/migrate

Trigger the migrate transaction from the given protocol.

POST https://api.expand.network/lendborrow/migrate

Request Body

Name
Type
Description

lendborrowId*

String

Refer to the Lend and Borrow ID page for details.

assets

String

Token addresses to migrate.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for the transaction.

rpc

String

Remote procedural call URL.

With gasPriority:

/setuseremode

Trigger the E-Mode options for the user.

POST https://api.expand.network/lendborrow/setuseremode

Request Body

Name
Type
Description

lendborrowId*

String

Refer to the Lend and Borrow ID page for details.

categoryId*

String

0 for default. 1 for stablecoins.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for the transaction.

rpc

String

Remote procedural call URL.

gasPriority

String

low, medium, or high.

With gasPriority (low):

/exitisolationmode

Trigger the exit of isolation mode options for the user.

POST https://api.expand.network/lendborrow/exitisolationmode

Request Body

Name
Type
Description

lendborrowId*

String

Refer to the Lend and Borrow ID page for details.

asset*

String

Token address to exit isolation mode.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for the transaction.

rpc

String

Remote procedural call URL.

With gasPriority:

Last updated