Skip to main content

Debt swap

GET 

/v1/actions/loop/debt-swap

Swap debt between different borrow positions. Identify the repay-side debt market with marketUidIn and borrow-side with marketUidOut. Omit account for quote-only (returns data.quotes with price deltas). Include account to build full transaction calldata (populates actions with alternatives, transactions, and permissions).

Response actions fields (when account is provided):

  • alternatives: DEX aggregator swap transactions sorted best-output-first. Pick one to execute.
  • transactions: Empty for debt-swap operations (no setup needed).
  • permissions: Lender borrow and withdrawal delegations (targeting the lending protocol contract). Only missing delegations are returned. Execute these first.

Request

Responses

Quote or full build response