Skip to main content
POST
/
defi
/
lending
/
withdraw-avax
Withdraw AVAX from AAVE
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"
  }
}

Authorizations

Authorization
string
header
required

Use this format: ApiKey <your_api_key>

Body

application/json
userAddress
string
required
Example:

"0xb322E239E5A32724633A595b8f8657F9cbb307B2"

amount
number
required

Amount of AVAX to withdraw

Example:

0.1

chainId
number
required

Chain ID (43114 for Avalanche)

Example:

43114

Response

Withdraw transaction prepared successfully

success
boolean
Example:

true

message
string
Example:

"Withdraw transaction prepared successfully"

serializedTransaction
string
Example:

"{\"to\":\"0x...\",\"data\":\"0x\",\"value\":\"0\"}"

gasEstimation
object