Skip to main content
POST
Prepare an Aave position unwind

Headers

x-api-key
string
required

API key for authentication

Example:

"your-api-key"

x-api-version
string

API version identifier (e.g. "2026-04.amazon"). Optional today, will become required in a future release.

Pattern: ^\d{4}-\d{2}\.[a-z0-9]+$
Example:

"2026-04.amazon"

Path Parameters

address
string
required

The EOA holding the position. It signs and sends the returned transaction.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91"

Body

application/json
account
string
required

The registered deposit account the proceeds go to. The recipient is resolved from this server-side; it is never taken from the request directly.

Pattern: ^0x[a-fA-F0-9]{40}$
market
string
required

The Aave market's Pool address, as returned in a position's market.address. Required rather than inferred, because a chain can host several markets.

Pattern: ^0x[a-fA-F0-9]{40}$
chainId
integer
required
Example:

8453

asset
string
required

The supplied underlying token to withdraw

Pattern: ^0x[a-fA-F0-9]{40}$
amount
string

Base units to withdraw. Omit for the largest amount currently permitted. An amount above that maximum is rejected rather than silently reduced.

Pattern: ^\d+$
Example:

"1000000000000000000"

Response

Unsigned withdraw transaction

transaction
object
required

Unsigned transaction for the holding EOA to sign and send. The backend never executes it — the EOA holds the aTokens, so only it can authorise the withdraw.

amount
string
required

Base units the transaction will withdraw

isFullExit
boolean
required

True when the whole position is being withdrawn, in which case the calldata uses the max-uint sentinel so interest accrued before the transaction lands is swept too.

recipient
string
required

The deposit address the proceeds are sent to, resolved from the registered account. Echoed so it is auditable.

constraints
string[]
required

Why the amount is below the supplied balance, if it is. Empty for an unconstrained full exit.