Skip to main content
POST
Plan Unloop Long

Plan Unloop Long

Creates a plan to close or reduce a leveraged long position on a Morpho market. Unlooping withdraws the exposure asset, swaps it for the backing asset, and repays the loan — repeatedly — to deleverage. Returns a plan ID and an EIP-712 digest that must be signed to authorize execution.

Request

Path parameters

Body parameters

Examples

Response (201 Created)

Response fields

Errors

Notes

  • Plans expire after 2 minutes. Sign and execute via Execute Plan before expiry.
  • The market_id must match the one used when opening the position with Plan Loop Long.
  • Set min_swap_backing_amount to protect against slippage — the transaction will revert if swaps yield less than this amount.