v1
latestOpenAPI 3.1.02026-07-24223580832.9 KBlendborrow
Withdraw With Approval
Process the withdrawal of deposited assets from a lending protocol with automated approval handling. Returns an array of transactions: an ERC-20 approval transaction (only when required) followed by the withdrawal transaction. This eliminates the need for manual allowance management before withdrawal.
💡 Compute Unit Value: 205 (Fixed)
post/defi/v1/lendborrow/withdraw-with-approval
Request body
Example request
{
"lendborrowId": "1000",
"asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "10000",
"to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"gas": "100000",
"gasPriority": "low",
"enableFee": false,
"batchOption": "EIP-5792",
"batcherContract": "0x9c933f9d2efd76ce25b0d3dde84d3f94e78a50ca",
"useCustomVaults": false,
"market": "USDC",
"marketId": "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
"vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
"onBehalfOf": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"collateral": false
}Response
Successful response
Example response
{
"status": 200,
"msg": "success",
"data": [
{
"chainId": "1",
"from": "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45",
"to": "0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c",
"gas": "51692",
"value": "0",
"data": "0x095ea7b300000000000000000000000054d9abeed8415446f8c736d198a8797156b41a93000000000000000000000000000000000000000000000000002386f26fc10000",
"referenceId": "878b54fb5a674e4db5de982600669fce"
},
{
"chainId": "1",
"from": "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45",
"to": "0x54d9ABeed8415446F8C736D198a8797156b41a93",
"gas": "500000",
"value": "0",
"data": "0xb460af94000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000829bfb482331b9dc2becb5483eca79c0578c3a45000000000000000000000000829bfb482331b9dc2becb5483eca79c0578c3a45",
"referenceId": "878b54fb5a674e4db5de982600669fce"
}
]
}