Quote repaying debt from collateral (v4)
get_repay_with_supply_quotev4 only. Quote paying down a borrow using supplied collateral, atomically and without the funds leaving Aave. 'debtPosition' is the borrow to reduce, a positionItemId from get_position_items with side=borrow whose 'quotableAs' lists repayDebt; 'repayWithReserve' is the reserveId of the collateral that pays for it, from get_markets with 'quotableAs' listing repayWith, on the same spoke. Use this instead of withdraw-swap-repay by hand: it is one atomic step, so the health factor never dips in between. The quoteId feeds prepare_order. Nothing is committed until the user signs, so state the plan rather than asking permission to quote it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | Yes | Wallet address (0x, 40 hex). | |
| amount | Yes | Amount of debt to repay, in main units, e.g. '100.5'. | |
| version | No | Optional, and only 'v4': this tool exists on v4 only. | |
| slippagePct | No | Optional max slippage as a percent string, e.g. '0.5'. Omit to accept the backend suggestion. | |
| debtPosition | Yes | positionItemId of the borrow to reduce (get_position_items side=borrow). | |
| repayWithReserve | Yes | reserveId of the collateral that pays for it (from get_markets). |