/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.
Sample Request Sample Response
Copy https://api.expand.network/lendborrow/getpool?lendborrowId=1100&asset=usdc
Copy {
"status": 200,
"msg": "success",
"data": {
"tokenAddress": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
"poolAddress": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"variableBorrowRate": "0",
"stableBorrowRate": "15.317159470377728",
"variableSupplyRate": "0",
"stableSupplyRate": "5.076408388218856",
"ltv": "85.5",
"availableLiquidity": "27577473960885",
"reserveSize": "18717058035630"
}
}
/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.
Sample Request Sample Response
Copy https://api.expand.network/lendborrow/getpools?lendborrowId=1100&assets=USDT,usDC,rep
Copy {
"status": 200,
"msg": "success",
"data": {
"USDC": {
"tokenAddress": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
"poolAddress": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"variableBorrowRate": "0",
"stableBorrowRate": "15.317159470377728",
"variableSupplyRate": "0",
"stableSupplyRate": "5.076408388218856",
"ltv": "85.5",
"availableLiquidity": "27577473960885",
"reserveSize": "18717058035630"
},
"REP": {
"tokenAddress": "0x158079ee67fce2f58472a96584a73c7ab9ac95c1",
"poolAddress": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"variableBorrowRate": "0",
"stableBorrowRate": "4.560470927786797",
"variableSupplyRate": "0",
"stableSupplyRate": "0",
"ltv": "0",
"availableLiquidity": "1014353018766752581455",
"reserveSize": "3549421684597720326"
},
"USDT": {
"tokenAddress": "0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9",
"poolAddress": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"variableBorrowRate": "0",
"stableBorrowRate": "13.938973764802665",
"variableSupplyRate": "0",
"stableSupplyRate": "10.934276001927245",
"ltv": "0",
"availableLiquidity": "31414050451046",
"reserveSize": "4507835539299"
}
}
}
/getuseraccountdata
Get the repay, borrow, withdraw amount and health factor 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.
Sample Request Sample Response
Copy https://api.expand.network/lendborrow/getuseraccountdata?address=0x6Fb447Ae94F5180254D436A693907a1f57696900&lendborrowId=1100&asset=DAI
Copy {
"status": 200,
"msg": "success",
"data": {
"tokenAddress": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"repayAmount": "0",
"borrowAmount": "3977431061236148758",
"withdrawAmount": "1052289347511965358",
"healthFactor": "0"
}
}
/getuserpositions
Retrieves the lending and borrowing positions of a user, including details such as token balances and collateral usage status.
GET
https://api.expand.network/lendborrow/getuserpositions
Query Parameters
Remote procedural call URL.
Public address of sender.
Sample Request Sample Response
Copy https://api.expand.network/lendborrow/getuserpositions?address=0x6Fb447Ae94F5180254D436A693907a1f57696900&lendborrowId=1100
Copy {
"status": 200,
"msg": "success",
"data": [
{
"cToken": "0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643",
"underlyingAsset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"scaledCTokenBalance": "4504491746",
"usageAsCollateralEnabledOnUser": true
},
{
"cToken": "0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5",
"underlyingAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"scaledCTokenBalance": "4980469",
"usageAsCollateralEnabledOnUser": true
},
{
"cToken": "0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9",
"underlyingAsset": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"scaledCTokenBalance": "0",
"usageAsCollateralEnabledOnUser": true
},
{
"cToken": "0xFAce851a4921ce59e912d19329929CE6da6EB0c7",
"underlyingAsset": "0x514910771AF9Ca656af840dff83E8264EcF986CA",
"scaledCTokenBalance": "59526195",
"usageAsCollateralEnabledOnUser": true
}
]
}
/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.
Sample Request Sample Response
Copy https://api.expand.network/lendborrow/entermarketstatus?account=0x6Fb447Ae94F5180254D436A693907a1f57696900&lendborrowId=1100
Copy {
"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.
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
Sample Request Sample Response
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "298800"
}
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"value": "0",
"gas": "298800",
"data": "0xc2998238000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
"referenceId": "b2975c19e2594dcabbf193d25b4b6100"
}
}
Sample Request Sample Response
With gasPriority:
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "298800",
"gasPriority": "medium"
}
With gasPriority:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"value": "0",
"gas": "298800",
"data": "0xc2998238000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
"gasPrice": "4124373646",
"referenceId": "d3596cbd688b452fba6aa0185a948869"
}
}
Sample Request Sample Response
With ofacCheck:
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "298800",
"gasPriority": "medium",
"ofacCheck": true
}
With ofacCheck:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"value": "0",
"gas": "298800",
"data": "0xc2998238000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
"gasPrice": "448938049",
"estimationCheck": true,
"insights": {
"asset": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
},
"to": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
}
},
"referenceId": "14d13cf25d184178afa59ba3d519fc98"
}
}
/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.
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
Sample Request Sample Response
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "442020"
}
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "442020",
"data": "0xc5ebeaec00000000000000000000000000000000000000000000000000000000000186a0",
"referenceId": "bf5abab50f85428b86d08cc1e06bf193"
}
}
Sample Request Sample Response
With gasPriority (medium):
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority":"medium"
}
With gasPriority:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "192020",
"data": "0xc5ebeaec00000000000000000000000000000000000000000000000000005af3107a4000",
"gasPrice": "4050857834",
"referenceId": "6123347ffa3648a2b81110ab098d0ced"
}
}
Sample Request Sample Response
With ofacCheck :
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority":"medium",
"ofacCheck": true
}
With ofacCheck:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "192020",
"data": "0xa0712d6800000000000000000000000000000000000000000000000000005af3107a4000",
"gasPrice": "445876376",
"estimationCheck": true,
"insights": {
"asset": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
},
"to": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
}
},
"referenceId": "4c3de09ac30642e68df4c36443e1402b"
}
}
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.
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
Sample Request Sample Response
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"amount": "1000000000000000000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "192020"
}
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "192020",
"data": "0xa0712d680000000000000000000000000000000000000000000000000de0b6b3a7640000",
"referenceId": "337e28b9a35e45138e41d38b49d4f957"
}
}
Sample Request Sample Response
With gasPriority (medium):
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority":"medium"
}
With gasPriority:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "192020",
"data": "0xa0712d6800000000000000000000000000000000000000000000000000005af3107a4000",
"gasPrice": "4152465976",
"referenceId": "e97309d3381e4ac79dd9addc9b58ae50"
}
}
Sample Request Sample Response
With ofacCheck:
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority":"medium",
"ofacCheck": true
}
With ofacCheck:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "192020",
"data": "0xa0712d6800000000000000000000000000000000000000000000000000005af3107a4000",
"gasPrice": "445223472",
"estimationCheck": true,
"insights": {
"asset": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
},
"to": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
}
},
"referenceId": "273328770acc424fafd20858b8a7cbc2"
}
}
/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.
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
Sample Request Sample Response
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "152020"
}
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "152020",
"data": "0x0e75270200000000000000000000000000000000000000000000000000000000000186a0",
"referenceId": "853ac7eba20b4002a739568ac0a362e0"
}
}
Sample Request Sample Response
With gasPriority (medium):
Copy {
"lendborrowId": "1100",
"asset": "USDC",
"amount": "100000000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority":"medium"
}
With gasPriority:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
"value": "0",
"gas": "192020",
"data": "0x0e75270200000000000000000000000000000000000000000000000000005af3107a4000",
"gasPrice": "3952066622",
"referenceId": "57030a6f5aa84526a1081543fe566e0c"
}
}
Sample Request Sample Response
With ofacCheck:
Copy {
"lendborrowId": "1100",
"asset": "USDC",
"amount": "100000000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority": "medium",
"ofacCheck": true
}
With ofacCheck:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
"value": "0",
"gas": "192020",
"data": "0x0e75270200000000000000000000000000000000000000000000000000005af3107a4000",
"gasPrice": "487306898",
"estimationCheck": true,
"insights": {
"asset": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
},
"to": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
}
},
"referenceId": "80ecbd4fe67d4d41a06b6ed8ba9d5750"
}
}
/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.
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
Sample Request Sample Response
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"amount": "1000000000000000000",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "312020"
}
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "312020",
"data": "0x852a12e30000000000000000000000000000000000000000000000000de0b6b3a7640000",
"referenceId": "b6e17376297348ebbe4e82fd5429b267"
}
}
Sample Request Sample Response
With gasPriority (medium):
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority":"medium"
}
With gasPriority:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "192020",
"data": "0x852a12e3000000000000000000000000000000000000000000000000000000174876e800",
"gasPrice": "4091632147",
"referenceId": "512d96edebab41b692a408d508c96ffc"
}
}
Sample Request Sample Response
With ofacCheck:
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"amount": "100000000000",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "192020",
"gasPriority":"medium",
"ofacCheck": true
}
With ofacCheck:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"value": "0",
"gas": "192020",
"data": "0x852a12e3000000000000000000000000000000000000000000000000000000174876e800",
"gasPrice": "461700210",
"estimationCheck": true,
"insights": {
"asset": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
},
"to": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
}
},
"referenceId": "d08f2d5f06a4451782dfb1df220f44e7"
}
}
/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.
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
Sample Request Sample Response
Copy {
"lendborrowId": "1100",
"asset": "dai",
"from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
"gas": "40000"
}
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
"to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"value": "0",
"gas": "40000",
"data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
"referenceId": "2a7d6bd372b14b20b4d854daa01487b3"
}
}
Sample Request Sample Response
With gasPriority (medium):
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "40000",
"gasPriority":"medium"
}
With gasPriority:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"value": "0",
"gas": "40000",
"data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
"gasPrice": "4248417967",
"referenceId": "8d28cea2f5c84704831bfbcbeba4cedb"
}
}
Sample Request Sample Response
With ofacCheck:
Copy {
"lendborrowId": "1100",
"asset": "DAI",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"gas": "40000",
"gasPriority": "medium",
"ofacCheck": true
}
With ofacCheck:
Copy {
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
"to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
"value": "0",
"gas": "40000",
"data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
"gasPrice": "499498318",
"estimationCheck": true,
"insights": {
"asset": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
},
"to": {
"issues": [],
"verdict": {
"code": 0,
"label": "NO_ISSUES"
}
}
},
"referenceId": "e9bfe6229a844227a92a2f6669aa1da0"
}
}
Following is the list of supported tokens :
Token List - Mainnet Token List - Testnet