Actions61
- Activity Actions
- Asset Actions
- Custom Query Actions
- Hub Actions
- Lending Actions
- Market Data Actions
- Position Management Actions
- Position Swap Actions
- Protocol Actions
- Reserve Actions
- Spoke Actions
- Swap Actions
- User Position Actions
Swap → Get Quote
AI-generatedSummary
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...'