GET
https://api.expand.network/lendborrow/getassetinfo
Name | Type | Description |
---|---|---|
GET
https://api.expand.network/lendborrow/getpool
Name | Type | Description |
---|---|---|
GET
https://api.expand.network/lendborrow/getuseraccountdata
GET
https://api.expand.network/lendborrow/getclaimedrewards
GET
https://api.expand.network/lendborrow/getmaxamounts
GET
https://api.expand.network/lendborrow/getgovernordata
POST
https://api.expand.network/lendborrow/allow
With gasPriority:
With gasPriority:
POST
https://api.expand.network/lendborrow/borrow
With gasPriority:
With gasPriority:
POST
https://api.expand.network/lendborrow/claimrewards
With gasPriority:
With gasPriority:
POST
https://api.expand.network/lendborrow/deposit
With gasPriority:
With gasPriority:
POST
https://api.expand.network/lendborrow/repay
With gasPriority:
With gasPriority:
POST
https://api.expand.network/lendborrow/transfer
With gasPriority:
With gasPriority:
POST
https://api.expand.network/lendborrow/withdraw
With gasPriority:
With gasPriority:
POST
https://api.expand.network/lendborrow/bundleactions
With gasPriority:
With gasPriority:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
asset*
String
Token's address to get the details of.
market
String
USDC, WETH standard choice.
by default it is USDC.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
market
String
USDC, WETH standard choice.
by default it is USDC.
asset
String
The asset value equals the market value, with USDC as default if market value is not provided; users can pass 'asset' as both key and value.
rpc
String
Remote procedural call URL.
lendborrowId*
String
Refer to the Lend and Borrow ID page for details.
address*
String
Public address of sender.
market
String
USDC, WETH standard choice.
by default it is USDC.
asset
String
The asset value equals the market value, with USDC as default if market value is not provided; users can pass 'asset' as both key and value.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
address*
String
Public address of sender.
market
String
USDC, WETH standard choice.
by default it is USDC.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
address*
String
Public address of sender.
asset*
String
Token's address to get the details of.
market
String
USDC, WETH standard choice.
by default it is USDC.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
market
String
USDC, WETH standard choice.
by default it is USDC.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
manager*
String
The address of the account that can have manager permissions over another.
isAllowed*
Boolean
"true" to add the manager and "false" to remove the manager. By default, true
from*
String
Public address of sender
gas*
String
Maximum gas to be approved for the transaction.
gasPriority
String
low, medium or high.
market
String
USDC, WETH standard choice.
by default it is USDC.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
amount*
String
Number of tokens to be borrowed.
from*
String
Public address of sender.
gas*
String
Maximum gas to be approved for the transaction.
gasPriority
String
low, medium or high.
market
String
USDC, WETH standard choice.
by default it is USDC.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
from*
String
Public address of sender
gas*
String
Maximum gas to be approved for the transaction.
gasPriority
String
low, medium or high.
market
String
USDC, WETH standard choice.
by default it is USDC.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
from*
String
Public address of sender.
asset*
String
Token's address to get the details of.
amount*
String
Number of tokens to be borrowed.
to
String
Public address of receiver.
gas*
String
Maximum gas to be approved for the transaction.
gasPriority
String
low, medium or high.
market
String
USDC, WETH standard choice.
by default it is USDC.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
from*
String
Public address of sender.
amount*
String
Number of tokens to be repayed.
gas*
String
Maximum gas to be approved for the transaction.
gasPriority
String
low, medium or high.
market
String
USDC, WETH standard choice.
by default it is USDC.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
from*
String
Public address of sender.
asset*
String
Address of token to be transferred.
to*
String
Public address of receiver.
amount*
String
Number of tokens to be repayed.
gas*
String
Maximum gas to be approved for the transaction.
gasPriority
String
low, medium or high.
market
String
USDC, WETH standard choice.
by default it is USDC.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
from*
String
Public address of sender.
asset*
String
Address of token to be transferred.
to
String
Public address of receiver.
amount*
String
Number of tokens to withdraw.
gas*
String
Maximum gas to be approved for the transaction.
gasPriority
String
low, medium or high.
market
String
USDC, WETH standard choice.
by default it is USDC.
rpc
String
Remote procedural call URL.
lendBorrowId*
String
Refer to the Lend and Borrow ID page for details.
actions*
Array
An array of strings that correspond to the actions. Refer here for details.
data*
Array
An array of calldatas for each action to be called in the invoke transaction. Refer here for details.
from*
String
Public address of sender.
gas*
String
Maximum gas to be approved for the transaction.
gasPriority
String
low, medium or high.
market
String
USDC, WETH standard choice.
by default it is USDC.
Provides connectivity across the various Lend and Borrow protocols available on the EVM and Non-EVM chains.
Following are the common functions implemented for all the Lend and Borrow protocols:-
Name | Type | Description |
---|---|---|
Every protocol requires a different set of parameters to perform the common operations. Please refer to the sub-sections for details.
Following is a sequence diagram for deposit() process in Compound:-
Following is a sequence diagram for deposit() process in Aave:-
Following is a sequence diagram for borrow() process:-
Following is a sequence diagram for liquidate() process:-
Following is a sequence diagram for repay() process:-
Following is a sequence diagram for withdraw() process:-
GET
https://api.expand.network/lendborrow/getpool
Name | Type | Description |
---|---|---|
GET
https://api.expand.network/lendborrow/getpools
Name | Type | Description |
---|---|---|
GET
https://api.expand.network/lendborrow/getuseraccountdata
POST
https://api.expand.network/lendborrow/borrow
With gasPriority (low):
With gasPriority:
POST
https://api.expand.network/lendborrow/deposit
With gasPriority (medium):
With gasPriority:
POST
https://api.expand.network/lendborrow/liquidate
POST
https://api.expand.network/lendborrow/repay
With gasPriority (low):
With gasPriority:
POST
https://api.expand.network/lendborrow/withdraw
With gasPriority:
With gasPriority:
POST
https://api.expand.network/lendborrow/migrate
With gasPriority:
With gasPriority:
POST
https://api.expand.network/lendborrow/setuseremode
With gasPriority (low):
With gasPriority:
POST
https://api.expand.network/lendborrow/exitisolationmode
With gasPriority:
With gasPriority:
GET
https://api.expand.network/lendborrow/getpool
Name | Type | Description |
---|---|---|
GET
https://api.expand.network/lendborrow/getpools
Name | Type | Description |
---|---|---|
GET
https://api.expand.network/lendborrow/getuseraccountdata
POST
https://api.expand.network/lendborrow/borrow
With gasPriority(medium):
With gasPriority:
POST
https://api.expand.network/lendborrow/deposit
With gasPriority (low):
With gasPriority:
POST
https://api.expand.network/lendborrow/liquidate
POST
https://api.expand.network/lendborrow/repay
With gasPriority (medium):
With gasPriority:
POST
https://api.expand.network/lendborrow/withdraw
With gasPriority (low):
With gasPriority:
GET
https://api.expand.network/lendborrow/getpool
Name | Type | Description |
---|---|---|
GET
https://api.expand.network/lendborrow/getpools
Name | Type | Description |
---|---|---|
GET
https://api.expand.network/lendborrow/getuseraccountdata
GET
https://api.expand.network/lendborrow/entermarketstatus
POST
https://api.expand.network/lendborrow/entermarket
With gasPriority:
With gasPriority:
POST
https://api.expand.network/lendborrow/borrow
With gasPriority (medium):
With gasPriority:
POST
https://api.expand.network/lendborrow/deposit
With gasPriority (medium):
With gasPriority:
POST
https://api.expand.network/lendborrow/liquidate
POST
https://api.expand.network/lendborrow/repay
With gasPriority (medium):
With gasPriority:
POST
https://api.expand.network/lendborrow/withdraw
With gasPriority (medium):
With gasPriority:
POST
https://api.expand.network/lendborrow/exitmarket
With gasPriority (medium):
With gasPriority:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
getpool
Read
Get the lend and borrow APY for the given pool from the given protocol.
getpools
Read
Get the list of supply and borrow APYs of the mentioned assets.
getuseraccountdata
Read
Get the repay, borrow, and withdraw amount details for the given user.
entermarketstatus
Read
Check whether the user is approved before deposting.
getassetinfo
Read
Get the details of a specified asset like liquidation and borrow collateral factor, index and the price feed address. Available for Compound V3.
getclaimedrewards
Read
Get the rewards claimed by the specified account on the protocol. Available for Compound V3.
getmaxamounts
Read
Get the max withdrawable amount and the max borrowable amount of the base token for a given asset in the protocol for the specified account. Available for Compound V3.
getgovernordata
Read
Get the protocol and governor-related data for a market. Available for Compound V3.
allow
Write
Trigger a transaction on Compound V3 to allow or disallow the specified address to withdraw or transfer on behalf of the sender’s address.
claimrewards
Write
Trigger a transaction on Compound V3 to allow an account to claim rewards from the protocol.
deposit
Write
Trigger the deposit transaction from the given protocol.
transfer
Write
Trigger a transaction on Compound V3 to transfer an asset within the protocol to another account.
bundleactions
Write
Trigger a transaction on Compound V3 to pass an array of action codes and data w.r.t the action codes that are executed, one by one, in a single transaction.
borrow
Write
Trigger the borrow transaction from the given protocol. Borrows the base token from specified market in case of Compound V3.
liquidate
Write
Trigger the liquidate transaction from the given protocol.
repay
Write
Trigger the repay transaction from the given protocol.
withdraw
Write
Trigger the withdrawal transaction from the given protocol.
migrate
Write
Trigger the migrate transaction for Aave v3.
setuseremode
Write
Trigger the E-Mode options for the user, on Aave v3.
exitisolationmode
Write
Trigger the exit of isolation mode options for the user, on Aave v3.
entermarket
Write
Trigger the approve transaction as Compound needs the user to approve before they can start deposit.
exitmarket
Write
Trigger the exit market transaction for Compound.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
lendborrowId
String
Refer to the lend borrow Id page for details.
assets*
String
Comma-separated values of token address.
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.
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.
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.
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.
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.
amount*
String
Number of tokens to repay.
rpc
String
Remote procedural call URL.
gasPriority
String
low, medium, or high.
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.
rpc
String
Remote procedural call URL.
lendBorrowId
String
Refer to the Lend and Borrow ID page for details.
asset*
String
Token's symbol to get the details of.
lendborrowId
String
Refer to the lend borrow Id page for details.
assets*
String
Comma-separated values of token address.
rpc
String
Remote procedural call URL.
lendborrowId
String
Refer to the lend borrow Id page for details.
asset*
String
Token's symbol to get detail of.
address*
String
Public address of sender.
lendborrowId
String
Refer to the Lend and Borrow ID page for details.
rpc
String
Remote procedural call URL.
account*
String
Public address of the user.
rpc
String
Remote procedural call URL.
lendBorrowId
String
Refer to the Lend and Borrow ID page for details.
asset*
String
Token's symbol to get the details of.
from*
String
Sender public address.
gas*
String
Maximum gas to be approved for the transaction.
lendborrowId
String
Refer to the Lend and Borrow ID page for details.
asset*
String
Token's symbol to borrow.
amount*
String
Number of tokens to be borrowed.
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.
lendborrowId
String
Refer to the Lend and Borrow ID page for details.
asset*
String
Token's symbol to deposit.
amount*
String
Number of tokens to be deposited.
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.
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.
from*
String
Sender public address.
gas*
String
Maximum gas to be approved for the transaction.
rpc
String
Remote procedural call URL.
lendborrowId
String
Refer to the Lend and Borrow ID page for details.
asset*
String
Token's symbol to be repaid.
amount*
String
Number of tokens to be repaid.
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.
lendborrowId
String
Refer to the Lend and Borrow ID page for details.
asset*
String
Token's symbol to withdraw.
amount*
String
Number of tokens to withdraw.
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.
rpc
String
Remote procedural call URL.
lendborrowId
String
Refer to the Lend and Borrow ID page for details.
asset*
String
Token's symbol.
gas*
String
Maximum gas to be approved for the transaction.
from*
String
Sender's public address.
gasPriority
String
low, medium, or high.