Aave V4 icon

Aave V4

Query Aave V4 DeFi protocol. Use this to: check supported chains, list hubs/spokes/reserves, get user positions/balances/supplies/borrows by wallet address, view transaction history, get exchange rates and APY history. Supports custom GraphQL queries for advanced use cases.

Position Swap → Get Withdraw Swap Quote

AI-generated

Summary

Fetch a swap quote for withdrawing a position's funds into a specified reserve.

Inputs

  • chainId (required) — Choose from the list, or specify an ID using an expression
  • withdrawPosition (required) — The ID of the supply position to withdraw (UserSupplyItemId)
  • withdrawBuyReserve (required) — The ID of the reserve to swap withdrawn funds into
  • withdrawAmount (required) — The amount to withdraw and swap (in token units)
  • withdrawUserAddress (required) — The user address performing the withdrawal

Output shape

a single swap quote object

Contains trade details such as input amount, expected output, price, and possible error information; shape is fixed but may include optional fields.

Examples

Example 1: Withdraw 1.0 USDC from position supply_item_abc into reserve reserve_xyz on Ethereum

chainId: "ethereum", withdrawPosition: "supply_item_abc", withdrawBuyReserve: "reserve_xyz", withdrawAmount: "1.0", withdrawUserAddress: "0x123..."

Example 2: Get quote for swapping withdrawn funds from a position into a stablecoin reserve on Polygon

chainId: "polygon", withdrawPosition: "pos_123", withdrawBuyReserve: "reserve_stable", withdrawAmount: "50.0", withdrawUserAddress: "0xabc..."

Example 3: Query the swap price for withdrawing a small amount into a new reserve with default settings

chainId: "base", withdrawPosition: "pos_001", withdrawBuyReserve: "reserve_new", withdrawAmount: "0.1", withdrawUserAddress: "0xdef..."

Links

Discussion