/getpool
Get the lend and borrow APY for the given pool from AAVE protocol.
GET
https://api.expand.network/lendborrow/getpool
Query Parameters
Remote procedural call URL.
Token address to get the details of.
https://api.expand.network/lendborrow/getpool?lendborrowId=1000&asset=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
{
"status": 200,
"msg": "success",
"data": {
"tokenAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"variableBorrowRate": "3.26",
"stableBorrowRate": "5.27",
"variableSupplyRate": "0",
"stableSupplyRate": "1.26"
}
}
/getpools
Get the list of supply and borrow APYs of the mentioned assets.
GET
https://api.expand.network/lendborrow/getpools
Query Parameters
Comma-separated values of token address.
https://api.expand.network/lendborrow/getpools?lendborrowId=1000&assets=0x6b175474e89094c44da98b954eedeac495271d0f,0xdac17f958d2ee523a2206206994597c13d831ec7,0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
{
"status": 200,
"msg": "success",
"data": {
"USDT": {
"tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"variableBorrowRate": "3.70",
"stableBorrowRate": "11.85",
"variableSupplyRate": "0",
"stableSupplyRate": "3.00",
"symbol": "USDT"
},
"DAI": {
"tokenAddress": "0x6b175474e89094c44da98b954eedeac495271d0f",
"variableBorrowRate": "3.01",
"stableBorrowRate": "11.51",
"variableSupplyRate": "0",
"stableSupplyRate": "1.66",
"symbol": "DAI"
},
"WETH": {
"tokenAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"variableBorrowRate": "3.27",
"stableBorrowRate": "5.27",
"variableSupplyRate": "0",
"stableSupplyRate": "1.26",
"symbol": "WETH"
},
"USDC": {
"tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"variableBorrowRate": "2.96",
"stableBorrowRate": "10.48",
"variableSupplyRate": "0",
"stableSupplyRate": "1.83",
"symbol": "USDC"
}
}
}
/getuseraccountdata
Get the repay, borrow, and withdraw amount details for the given user.
GET
https://api.expand.network/lendborrow/getuseraccountdata
Query Parameters
Remote procedural call URL.
Public address of sender.
Interest mode as per Aave. Is set '1' as default.
https://api.expand.network/lendborrow/getuseraccountdata?address=0x6Fb447Ae94F5180254D436A693907a1f57696900&asset=0x514910771af9ca656af840dff83e8264ecf986ca&lendborrowId=1000&interestRateMode=1
{
"status": 200,
"msg": "success",
"data": {
"tokenAddress": "0x514910771af9ca656af840dff83e8264ecf986ca",
"repayAmount": "0",
"borrowAmount": "201991256034911571",
"withdrawAmount": "0"
}
}
/borrow
Trigger the borrow transaction from the given protocol.
POST
https://api.expand.network/lendborrow/borrow
Request Body
Number of tokens to be borrowed.
Interest mode as per Aave. 0 for static and 1 for variable.
Referral code needed by Aave.
Required in case borrow need to be done on behalf of other public address.
Maximum gas to be approved for transaction.
Remote procedural call URL.
{
"lendborrowId": "1000",
"asset": "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F",
"amount": "100",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"onBehalfOf": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"interestRateMode": "2",
"gas": "408298"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId":"1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x4bd5643ac6f66a5237E18bfA7d47cF22f1c9F210",
"value": "0",
"gas": "408298",
"data": "0xa415bcad000000000000000000000000fc1ab0379db4b6ad8bf5bc1382e108a341e2eabb00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006"
}
}
With gasPriority(medium):
{
"lendborrowId": "1000",
"asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"amount": "100000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"onBehalfOf": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"interestRateMode": "2",
"gas": "408298",
"gasPriority":"medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId":"1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
"value": "0",
"gas": "397254",
"data": "0xa415bcad0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fae7d9854995e28beb1b1da864ee2a1e2ec17f07"
}
}
/deposit
Trigger the deposit transaction from the given protocol.
POST
https://api.expand.network/lendborrow/deposit
Request Body
Token address to deposit.
Number of tokens to deposit.
Referral code needed by Aave.
Required in case deposit need to be done on behalf of other public address.
Maximum gas to be approved for the transaction.
Remote procedural call URL.
0 for any ERC-20 token,
1 for ETH.
{
"lendborrowId": "1000",
"asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "10000000000000000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"onBehalfOf": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "408298"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId":"1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x4bd5643ac6f66a5237E18bfA7d47cF22f1c9F210",
"value": "0",
"gas": "408298",
"data": "0xe8eda9df000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d6000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000000000000"
}
}
With gasPriority (low):
{
"lendborrowId": "1000",
"asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"amount": "10000000000000",
"from": "0x356db816602c85e2075774bb77d13995c8bab023",
"onBehalfOf": "0x356db816602c85e2075774bb77d13995c8bab023",
"gas": "520000",
"gasPriority": "low"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x356db816602c85e2075774bb77d13995c8bab023",
"to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
"value": "0",
"gas": "217582",
"data": "0xe8eda9df0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000009184e72a000000000000000000000000000356db816602c85e2075774bb77d13995c8bab0230000000000000000000000000000000000000000000000000000000000000000"
}
}
/liquidate
Trigger the liquidate transaction from the given protocol.
POST
https://api.expand.network/lendborrow/liquidate
Request Body
Address of the collateral token.
Address of the debt token.
Public address of the user whose account need to be liquidated.
Amount of debt to be covered.
Amount of token A to be received.
Maximum gas to be approved for the transaction.
Remote procedural call URL.
/repay
Trigger the repay transaction from the given protocol.
POST
https://api.expand.network/lendborrow/repay
Request Body
Interest mode as per Aave. 0 for static and 1 for variable.
Required in case repay need to be done on behalf of other public address.
Maximum gas to be approved for the transaction.
Number of tokens to repay.
Remote procedural call URL.
{
"lendborrowId": "1000",
"asset": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"amount": "100000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"onBehalfOf": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"interestRateMode": "2",
"gas": "408298"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId":"1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x4bd5643ac6f66a5237E18bfA7d47cF22f1c9F210",
"value": "0",
"gas": "408298",
"data": "0x573ade81000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006"
}
}
With gasPriority (medium):
{
"lendborrowId": "1000",
"asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"amount": "10000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"onBehalfOf": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"interestRateMode": "2",
"gas": "408298",
"gasPriority":"medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId":"1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
"value": "0",
"gas": "288354",
"data": "0x573ade810000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000002540be4000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000fae7d9854995e28beb1b1da864ee2a1e2ec17f07"
}
}
/withdraw
Trigger the withdraw transaction from the given protocol.
POST
https://api.expand.network/lendborrow/withdraw
Request Body
Token address to be withdraw.
Number of tokens to withdraw.
Recipient public address.
Maximum gas to be approved for the transaction.
Remote procedural call URL.
{
"lendborrowId": "1000",
"asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"amount": "1000000000000000000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "408298"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId":"1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x4bd5643ac6f66a5237E18bfA7d47cF22f1c9F210",
"value": "0",
"gas": "408298",
"data": "0x69328dec0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006"
}
}
With gasPriority (low):
{
"lendborrowId": "1000",
"asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"amount": "100000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "408298",
"gasPriority":"low"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId":"1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
"value": "0",
"gas": "332250",
"data": "0x69328dec0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000174876e800000000000000000000000000fae7d9854995e28beb1b1da864ee2a1e2ec17f07"
}
}
Last updated