Prepare close and redeem
prepare_close_and_redeemAfter settlement: withdrawResidual (closes the sponsor position and pays the residual), redeem the wallet's synth if redemption is open, or claim a top-up. Returns UNSIGNED transaction data (to, data, value, gas) for the user's own wallet; simulated against the latest block first and refused if it would revert. Never signs or sends.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | The user's wallet address (0x...). Used to read the position and as the simulated sender; nothing is signed. | |
| market | Yes | Market address (0x...) or symbol, e.g. NO-NVDA |