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.

Swap → Get Quote

AI-generated

Summary

Fetch a swap quote from Aave V4

Inputs

  • chainId — Choose from the list, or specify an ID using an expression
  • swapBuyToken (required) — The token address to buy (or 'native' for native token)
  • swapSellToken (required) — The token address to sell (or 'native' for native token)
  • swapAmount (required) — The amount to swap (in token units, e.g., 1.5)
  • swapKind — Whether to specify exact sell amount or exact buy amount
  • swapFromAddress (required) — The address initiating the swap
  • swapReceiverAddress — The address to receive the tokens (optional, defaults to from address)

Output shape

a promise resolving to a quote response

Contains details of the swap quote such as expected output amounts and rates; exact field names are not defined in the provided schema.

Examples

Example 1: Swap native token for USDC on Ethereum mainnet

chainId: 1, swapBuyToken: '0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', swapSellToken: '0xC02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', swapAmount: '1', swapKind: 'SELL', swapFromAddress: '0x...'

Example 2: Buy 100 units of an ERC-20 token using native token

chainId: 56, swapBuyToken: '0x... (native)', swapSellToken: '0xTokenAddress', swapAmount: '100', swapKind: 'BUY', swapFromAddress: '0x...'

Links

Discussion