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 Borrow Swap Quote

AI-generated

Summary

Get Borrow Swap Quote retrieves a borrow swap quote for a debt position.

Inputs

  • chainId — Chain name or ID to perform the swap on; optional, can be supplied via expression.
  • borrowSwapDebtPosition (required) — The ID of the debt position to swap (UserSupplyItemId) obtained from User Position operations.
  • borrowSwapBuyReserve (required) — The ID of the reserve to swap debt into.
  • borrowSwapAmount (required) — The amount of tokens to swap, expressed in token units.
  • borrowSwapUserAddress (required) — The user address that will perform the swap.

Output shape

A JSON object representing the borrow swap quote, typically containing swap details such as estimated rates, amounts, and identifiers.

The exact fields may vary by implementation; errors are returned in an error envelope and may include additional diagnostic information.

Examples

Example 1: A user wants to swap debt from one reserve into another on Arbitrum.

'borrowSwapDebtPosition': 'debt_item_123', 'borrowSwapBuyReserve': 'reserve_456', 'borrowSwapAmount': '10.0', 'borrowSwapUserAddress': '0xAbc...', 'chainId': '42161'

Links

Discussion