Lending Protocols
Get Pool
The user will be able to get the lend and borrow APY for the given pool from the given protocol.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_getPool",
"params": [
{
"lendborrowId": "1200",
"asset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}
]
}
Get Pools
The user will be able to get the list of supply and borrow APYs of the mentioned assets.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_getPools",
"params": [
{
"lendborrowId": "1200",
"assets": [
"0x6b175474e89094c44da98b954eedeac495271d0f",
"0xdac17f958d2ee523a2206206994597c13d831ec7",
"0x5f98805A4E8be255a32880FDeC7F6728C6568bA0"
]
}
]
}
Get User Account Data
The user will be able to get the repay, borrow, and withdraw amount details for the given user.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_getUserAccountData",
"params": [
{
"lendborrowId": "1200",
"asset": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
"address": "0x025C62433Ecf89Ed45EDf7F41BF05318204d0b2b",
"interestRateMode": "1"
}
]
}
Get Enter Market Status
The user will be able to check whether the user approved before depositing on compound.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_getLendBorrowEnterMarketStatus",
"params": [
{
"lendborrowId": "1100",
"account": "0x6Fb447Ae94F5180254D436A693907a1f57696900"
}
]
}
Borrow
The user will be able to trigger the borrow transaction from the given protocol.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_borrow",
"params": [
{
"lendborrowId": "1100",
"asset": "USDC",
"amount": "100000",
"from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"gas": "608298"
}
]
}
Deposit
The user will be able to trigger the deposit transaction from the given protocol.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_deposit",
"params": [
{
"lendborrowId": "1100",
"asset": "DAI",
"amount": "1000000000000000000",
"from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"gas": "608298"
}
]
}
Repay
The user will be able to trigger the repay transaction from the given protocol.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_repay",
"params": [
{
"lendborrowId": "1100",
"asset": "USDC",
"amount": "100000",
"from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"gas": "608298"
}
]
}
Withdraw
The user will be able to trigger the repay transaction from the given protocol.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_withdraw",
"params": [
{
"lendborrowId": "1100",
"asset": "DAI",
"amount": "1000000000000000000",
"from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"gas": "608298"
}
]
}
Enter Market
The user will be able to approve before they can start deposit on Compound.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_enterMarket",
"params": [
{
"lendborrowId": "1100",
"asset": "USDT",
"from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
"gas": "408298"
}
]
}
Exit Market
The user will be able to trigger the exit market transaction on Compound.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_exitMarket",
"params": [
{
"lendborrowId": "1100",
"asset": "USDT",
"from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
"gas": "608298"
}
]
}
Exit Isolation Mode
The user will be able to trigger the exit of isolation mode options on Aave v3.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_exitIsolationMode",
"params": [
{
"lendborrowId": "1200",
"asset": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
"from": "0xf7426829DBAAc7F26b48C49A04a93fc4f75cfa41",
"gas": "429000"
}
]
}
Set User E-mode
The user will be able to trigger the E-Mode options on Aave v3.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_setUserEMode",
"params": [
{
"lendborrowId": "1200",
"from": "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45",
"categoryId": "1",
"gas": "408298"
}
]
}
Migrate
The user will be able to trigger a transaction to migrate their positions from Aave v2 to Aave v3.
URL:
https://lend-borrow.quicknode.expand.network/lendborrow
Payload:
{
"method": "en_migrate",
"params": [
{
"lendborrowId": "1200",
"assets": [
"0x6b175474e89094c44da98b954eedeac495271d0f"
],
"from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
"gas": "329000"
}
]
}
Last updated