Close all positions
close_all_positionsFlatten EVERY open perpetual position with reduce-only MARKET orders (one per market). Respects the operator market allowlist (disallowed markets are skipped and reported). Each close is bounded at oracle ± slippageBps mirrored by side (default 500 bps = 5%). Returns a per-market result array — for any market reporting unfilled/partially_filled, re-run with a larger slippageBps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| slippageBps | No | Max slippage vs oracle, in bps (default 500). Raise to sweep thin books. |