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
Sample Request
Copy https://api.expand.network/lendborrow/getpool?lendborrowId=1200&asset=0x6b175474e89094c44da98b954eedeac495271d0f
Sample Response
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"tokenAddress" : "0x6b175474e89094c44da98b954eedeac495271d0f" ,
"variableBorrowRate" : "4.25" ,
"stableBorrowRate" : "6.42" ,
"variableSupplyRate" : "0" ,
"stableSupplyRate" : "2.92"
}
}
/getpools
Get the list of supply and borrow APYs of the mentioned assets.
GET
https://api.expand.network/lendborrow/getpools
Query Parameters
Sample Request
Copy https://api.expand.network/lendborrow/getpools?lendborrowId=1200&assets=0x6b175474e89094c44da98b954eedeac495271d0f,0xdac17f958d2ee523a2206206994597c13d831ec7
Sample Response
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"DAI" : {
"tokenAddress" : "0x6b175474e89094c44da98b954eedeac495271d0f" ,
"variableBorrowRate" : "4.25" ,
"stableBorrowRate" : "6.42" ,
"variableSupplyRate" : "0" ,
"stableSupplyRate" : "2.92" ,
"tokenSymbol" : "DAI"
} ,
"USDT" : {
"tokenAddress" : "0xdac17f958d2ee523a2206206994597c13d831ec7" ,
"variableBorrowRate" : "3.89" ,
"stableBorrowRate" : "8.89" ,
"variableSupplyRate" : "0" ,
"stableSupplyRate" : "2.72" ,
"tokenSymbol" : "USDT"
}
}
}
/getuseraccountdata
Get the repay, borrow, and withdraw amount details for the given user.
GET
https://api.expand.network/lendborrow/getuseraccountdata
Query Parameters
Sample Request
Copy https://api.expand.network/lendborrow/getuseraccountdata?interestRateMode=1&address=0x6fCe63859a859a0f30eD09B12F5010d790618ca4&asset=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&lendborrowId=1200
Sample Response
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"tokenAddress" : "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" ,
"repayAmount" : "0" ,
"borrowAmount" : "9549775239" ,
"borrowErrorMessage" : "The Stable Rate is not enabled for this currency" ,
"withdrawAmount" : "15061255968"
}
}
/borrow
Trigger the borrow transaction from the given protocol.
POST
https://api.expand.network/lendborrow/borrow
Request Body
Sample Request
Copy {
"lendborrowId" : "1200" ,
"asset" : "0x65afadd39029741b3b8f0756952c74678c9cec93" ,
"amount" : "100" ,
"from" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"onBehalfOf" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"interestRateMode" : "2" ,
"gas" : "408298"
}
Sample Response
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "408298" ,
"data": "0xa415bcad00000000000000000000000065afadd39029741b3b8f0756952c74678c9cec93000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000829bfb482331b9dc2becb5483eca79c0578c3a45"
}
}
Sample Request
With gasPriority (low):
Copy {
"lendborrowId" : "1200" ,
"asset" : "0x6B175474E89094C44Da98b954EedeAC495271d0F" ,
"amount" : "1000000000" ,
"from" : "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E" ,
"onBehalfOf" : "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E" ,
"interestRateMode" : "2" ,
"gas" : "408298" ,
"gasPriority" : "low"
}
Sample Response
With gasPriority:
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "408298" ,
"data": "0xa415bcad0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c99d660a51d41be5d47d66a3d89d5b83d92f27e",
"gasPrice" : "20468560119"
}
}
/deposit
Trigger the deposit transaction from the given protocol.
POST
https://api.expand.network/lendborrow/deposit
Request Body
Sample Request
Copy {
"lendborrowId" : "1200" ,
"asset" : "0x65afadd39029741b3b8f0756952c74678c9cec93" ,
"amount" : "10000000000000000" ,
"from" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"onBehalfOf" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"gas" : "408298"
}
Sample Response
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "408298" ,
"data": "0xe8eda9df00000000000000000000000065afadd39029741b3b8f0756952c74678c9cec93000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000829bfb482331b9dc2becb5483eca79c0578c3a450000000000000000000000000000000000000000000000000000000000000000"
}
}
Sample Request
With gasPriority (medium):
Copy {
"lendborrowId" : "1200" ,
"asset" : "0x6B175474E89094C44Da98b954EedeAC495271d0F" ,
"amount" : "10000000000" ,
"from" : "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07" ,
"onBehalfOf" : "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07" ,
"gas" : "408298" ,
"gasPriority" : "low"
}
Sample Response
With gasPriority:
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "218622" ,
"data": "0xe8eda9df0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000002540be400000000000000000000000000fae7d9854995e28beb1b1da864ee2a1e2ec17f070000000000000000000000000000000000000000000000000000000000000000"
}
}
/liquidate
Trigger the liquidate transaction from the given protocol.
POST
https://api.expand.network/lendborrow/liquidate
Request Body
/repay
Trigger the repay transaction from the given protocol.
POST
https://api.expand.network/lendborrow/repay
Request Body
Sample Request
Copy {
"lendborrowId" : "1200" ,
"asset" : "0xdAC17F958D2ee523a2206206994597C13D831ec7" ,
"amount" : "100000" ,
"from" : "0x63056E00436Da25BcF48A40dfBbDcc7089351006" ,
"onBehalfOf" : "0x63056E00436Da25BcF48A40dfBbDcc7089351006" ,
"interestRateMode" : "1" ,
"gas" : "408298"
}
Sample Response
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0x63056E00436Da25BcF48A40dfBbDcc7089351006" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "408298" ,
"data": "0x573ade81000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006"
}
}
Sample Request
With gasPriority (low):
Copy {
"lendborrowId" : "1200" ,
"asset" : "0x6B175474E89094C44Da98b954EedeAC495271d0F" ,
"amount" : "1000000000" ,
"from" : "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E" ,
"onBehalfOf" : "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E" ,
"interestRateMode" : "2" ,
"gas" : "408298" ,
"gasPriority" : "low"
}
Sample Response
With gasPriority:
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "408298" ,
"data": "0x573ade810000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000003b9aca0000000000000000000000000000000000000000000000000000000000000000020000000000000000000000004c99d660a51d41be5d47d66a3d89d5b83d92f27e",
"gasPrice" : "20820034647"
}
}
/withdraw
Trigger the withdraw transaction from the given protocol.
POST
https://api.expand.network/lendborrow/withdraw
Request Body
Sample Request
Copy {
"lendborrowId" : "1200" ,
"asset" : "0x65afadd39029741b3b8f0756952c74678c9cec93" ,
"amount" : "10000000000000000" ,
"from" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"to" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"gas" : "408298"
}
Sample Response
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "408298" ,
"data": "0x69328dec00000000000000000000000065afadd39029741b3b8f0756952c74678c9cec93000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000829bfb482331b9dc2becb5483eca79c0578c3a45"
}
}
Sample Request
With gasPriority:
Copy {
"lendborrowId" : "1200" ,
"asset" : "0x6B175474E89094C44Da98b954EedeAC495271d0F" ,
"amount" : "100000000" ,
"from" : "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E" ,
"to" : "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E" ,
"gas" : "408298" ,
"gasPriority" : "low"
}
Sample Response
With gasPriority:
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "234416" ,
"data": "0x69328dec0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000000000005f5e1000000000000000000000000004c99d660a51d41be5d47d66a3d89d5b83d92f27e"
}
}
/migrate
Trigger the migrate transaction from the given protocol.
POST
https://api.expand.network/lendborrow/migrate
Request Body
Sample Request
Copy {
"lendborrowId" : "1200" ,
"assets" : [
"0x6b175474e89094c44da98b954eedeac495271d0f"
] ,
"from" : "0x356dB816602c85e2075774bB77D13995c8Bab023" ,
"gas" : "329000"
}
Sample Response
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "329000" ,
"data": "0x69328dec00000000000000000000000065afadd39029741b3b8f0756952c74678c9cec930000000000000000000000000000000000000000000000000000000000000064000000000000000000000000829bfb482331b9dc2becb5483eca79c0578c3a45"
}
}
Sample Request
With gasPriority:
Copy {
"lendborrowId" : "1200" ,
"assets" : [
"0x6b175474e89094c44da98b954eedeac495271d0f"
] ,
"from" : "0x356dB816602c85e2075774bB77D13995c8Bab023" ,
"gas" : "329000" ,
"gasPriority" : "medium"
}
Sample Response
With gasPriority:
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0x356dB816602c85e2075774bB77D13995c8Bab023" ,
"to" : "0xb748952c7bc638f31775245964707bcc5ddfabfc" ,
"value" : "0" ,
"gas" : "408298" ,
"data": "0x3698d492000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
}
/setuseremode
Trigger the E-Mode options for the user.
POST
https://api.expand.network/lendborrow/setuseremode
Request Body
Sample Request
Copy {
"lendborrowId" : "1200" ,
"from" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"categoryId" : "1" ,
"gas" : "408298"
}
Sample Response
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "408298" ,
"data" : "0x28530a470000000000000000000000000000000000000000000000000000000000000001"
}
}
Sample Request
With gasPriority (low):
Copy {
"lendborrowId" : "1200" ,
"from" : "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07" ,
"categoryId" : "1" ,
"gas" : "408298" ,
"gasPriority" : "low"
}
Sample Response
With gasPriority:
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "72994" ,
"data" : "0x28530a470000000000000000000000000000000000000000000000000000000000000001"
}
}
/exitisolationmode
Trigger the exit of isolation mode options for the user.
POST
https://api.expand.network/lendborrow/exitisolationmode
Request Body
Sample Request
Copy {
"lendborrowId" : "1200" ,
"asset" : "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2" ,
"from" : "0xf7426829DBAAc7F26b48C49A04a93fc4f75cfa41" ,
"gas" : "429000"
}
Sample Response
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0xf7426829DBAAc7F26b48C49A04a93fc4f75cfa41" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "429000" ,
"data": "0x5a3b74b90000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a20000000000000000000000000000000000000000000000000000000000000000"
}
}
Sample Request
With gasPriority:
Copy {
"lendborrowId" : "1200" ,
"asset" : "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2" ,
"from" : "0xf7426829DBAAc7F26b48C49A04a93fc4f75cfa41" ,
"gas" : "429000" ,
"gasPriority" : "medium"
}
Sample Response
With gasPriority:
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"chainId" : "1" ,
"from" : "0xf7426829DBAAc7F26b48C49A04a93fc4f75cfa41" ,
"to" : "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" ,
"value" : "0" ,
"gas" : "408298" ,
"data": "0x5a3b74b90000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a20000000000000000000000000000000000000000000000000000000000000000"
}
}