Prepare withdraw
prepare_withdrawWithdraw collateral: withdraw(amount). "max" withdraws the most the minimum ratio and 10 USDG floor allow. Needs a fresh price when the position has debt. 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. | |
| amount | Yes | USDG to withdraw as a decimal string, or "max" | |
| market | Yes | Market address (0x...) or symbol, e.g. NO-NVDA |