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
Position Swap → Get Borrow Swap Quote
AI-generatedSummary
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'