cURL
curl --request POST \ --url https://api.relayer.fi/v1/defi/lending/withdraw-avax \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data '{ "userAddress": "0xb322E239E5A32724633A595b8f8657F9cbb307B2", "amount": 0.1, "chainId": 43114 }'
{ "success": true, "message": "Withdraw transaction prepared successfully", "serializedTransaction": "{\"to\":\"0x...\",\"data\":\"0x\",\"value\":\"0\"}", "gasEstimation": { "gasLimit": "200000", "estimatedCost": "0.01" } }
Prepare a transaction to withdraw AVAX from AAVE lending pool
Use this format: ApiKey <your_api_key>
ApiKey <your_api_key>
"0xb322E239E5A32724633A595b8f8657F9cbb307B2"
Amount of AVAX to withdraw
0.1
Chain ID (43114 for Avalanche)
43114
Withdraw transaction prepared successfully
true
"Withdraw transaction prepared successfully"
"{\"to\":\"0x...\",\"data\":\"0x\",\"value\":\"0\"}"
Show child attributes