/getpool
Get the lend and borrow APY for the given pool from the given protocol.
GET
https://api.expand.network/lendborrow/getpool
Query Parameters
Remote procedural call URL.
Token's symbol to get the details of.
https://api.expand.network/lendborrow/getpool?lendborrowId=1100&asset=usdc
{
"status": 200,
"msg": "success",
"data": {
"tokenAddress": "USDC",
"variableBorrowRate": "0",
"stableBorrowRate": "3.219941694305528",
"variableSupplyRate": "0",
"stableSupplyRate": "1.5063202247327823"
}
}
/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=1100&assets=USDT,usDC,rep
{
"status": 200,
"msg": "success",
"data": {
"USDC": {
"tokenAddress": "USDC",
"variableBorrowRate": "0",
"stableBorrowRate": "3.219941694305528",
"variableSupplyRate": "0",
"stableSupplyRate": "1.5063202247327823"
},
"REP": {
"tokenAddress": "REP",
"variableBorrowRate": "0",
"stableBorrowRate": "4.494254165428835",
"variableSupplyRate": "0",
"stableSupplyRate": "0"
},
"USDT": {
"tokenAddress": "USDT",
"variableBorrowRate": "0",
"stableBorrowRate": "3.902193315007918",
"variableSupplyRate": "0",
"stableSupplyRate": "2.2052582917344132"
}
}
}
/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.
Token's symbol to get detail of.
Public address of sender.
https://api.expand.network/lendborrow/getuseraccountdata?address=0x6Fb447Ae94F5180254D436A693907a1f57696900&lendborrowId=1100&asset=DAI
{
"status": 200,
"msg": "success",
"data": {
"tokenAddress": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"repayAmount": "1004263016205359327",
"borrowAmount": "344493657709312839",
"withdrawAmount": "0"
}
}
/entermarketstatus
Checks whether the user approved before depositing.
GET
https://api.expand.network/lendborrow/entermarketstatus
Query Parameters
Remote procedural call URL.
Public address of the user.
https://api.expand.network/lendborrow/entermarketstatus?account=0x6Fb447Ae94F5180254D436A693907a1f57696900&lendborrowId=1100
{
"status": 200,
"msg": "success",
"data": {
"enterMarketStatus": [
"0x20572e4c090f15667cF7378e16FaD2eA0e2f3EfF",
"0x822397d9a55d0fefd20F5c4bCaB33C5F65bd28Eb",
"0xCEC4a43eBB02f9B80916F1c718338169d6d5C1F0"
]
}
}
/entermarket
Compound needs the user to approve before they can start deposit.
POST
https://api.expand.network/lendborrow/entermarket
Query Parameters
Remote procedural call URL.
Token's symbol to get the details of.
Maximum gas to be approved for the transaction.
{
"lendborrowId": "1100",
"asset": "DAI",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "298800"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x627ea49279fd0de89186a58b8758ad02b6be2867",
"value": "0",
"gas": "298800",
"data": "0xc2998238000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000545a8eaf7ff6bb6f708cbb544ea55dbc2ad7b2a"
}
}
With gasPriority:
{
"lendborrowId": "1100",
"asset": "DAI",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "298800",
"gasPriority": "medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"value": "0",
"gas": "119508",
"data": "0xc2998238000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643"
}
}
/borrow
Trigger the withdraw transaction from the given protocol.
POST
https://api.expand.network/lendborrow/borrow
Request Body
Token's symbol to borrow.
Number of tokens to be borrowed.
Maximum gas to be approved for the transaction.
Remote procedural call URL.
{
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "442020"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x0545a8eaf7ff6bb6f708cbb544ea55dbc2ad7b2a",
"value": "0",
"gas": "442020",
"data": "0xc5ebeaec00000000000000000000000000000000000000000000000000000000000186a0"
}
}
With gasPriority (medium):
{
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority":"medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "332578",
"data": "0xc5ebeaec00000000000000000000000000000000000000000000000000005af3107a4000"
}
}
/deposit
Trigger the deposit transaction from the given protocol.
POST
https://api.expand.network/lendborrow/deposit
Request Body
Token's symbol to deposit.
Number of tokens to be deposited.
Maximum gas to be approved for the transaction.
Remote procedural call URL.
{
"lendborrowId": "1100",
"asset": "DAI",
"amount": "1000000000000000000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "192020"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x0545a8eaf7ff6bb6f708cbb544ea55dbc2ad7b2a",
"value": "0",
"gas": "192020",
"data": "0xa0712d680000000000000000000000000000000000000000000000000de0b6b3a7640000"
}
}
With gasPriority (medium):
{
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority":"medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "200285",
"data": "0xa0712d6800000000000000000000000000000000000000000000000000005af3107a4000"
}
}
/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.
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
Token's symbol to be repaid.
Number of tokens to be repaid.
Maximum gas to be approved for the transaction.
Remote procedural call URL.
{
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "152020"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x0545a8eaf7ff6bb6f708cbb544ea55dbc2ad7b2a",
"value": "0",
"gas": "152020",
"data": "0x0e75270200000000000000000000000000000000000000000000000000000000000186a0"
}
}
With gasPriority (medium):
{
"lendborrowId": "1100",
"asset": "USDC",
"amount": "100000000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority":"medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
"value": "0",
"gas": "178464",
"data": "0x0e75270200000000000000000000000000000000000000000000000000005af3107a4000"
}
}
/withdraw
Trigger the withdraw transaction from the given protocol.
POST
https://api.expand.network/lendborrow/withdraw
Request Body
Token's symbol to withdraw.
Number of tokens to withdraw.
Maximum gas to be approved for the transaction.
Remote procedural call URL.
{
"lendborrowId": "1100",
"asset": "DAI",
"amount": "1000000000000000000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "312020"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x0545a8eaf7ff6bb6f708cbb544ea55dbc2ad7b2a",
"value": "0",
"gas": "312020",
"data": "0xdb006a750000000000000000000000000000000000000000000000000de0b6b3a7640000"
}
}
With gasPriority (medium):
{
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority":"medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "265723",
"data": "0x852a12e3000000000000000000000000000000000000000000000000000000174876e800"
}
}
/exitmarket
Trigger the exit market transaction for the given protocol
POST
https://api.expand.network/lendborrow/exitmarket
Request Body
Remote procedural call URL.
Maximum gas to be approved for the transaction.
{
"lendborrowId": "1100",
"asset": "dai",
"from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
"gas": "40000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
"to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"value": "0",
"gas": "40000",
"data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643"
}
}
With gasPriority (medium):
{
"lendborrowId": "1100",
"asset": "DAI",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "40000",
"gasPriority":"medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"value": "0",
"gas": "161845",
"data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643"
}
}
Following is the list of supported tokens :
Token List - Mainnet
Token List - Testnet
Last updated