Prepare create position
prepare_create_positionOpen or add to a position: USDG approval (if needed) and create(collateral, tokens). Enforces the 11 USDG minimum for a new position, both caps and a fresh price. 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 | |
| collateral | Yes | Collateral to deposit, in USDG as a decimal string, e.g. "11" or "25.5" | |
| mintTokens | Yes | Synth to mint ("0" for collateral only), in synth tokens as a decimal string, e.g. "0.0189" |