flatten_positions
Close all open positions using opposite-side market orders, optionally restricted to a specific symbol. Defaults to dry-run for safe validation before executing.
Instructions
Close every open position with opposite-side market orders, optionally filtered by symbol. Default dry_run=true. Use for 'close everything' operator actions or end-of-day flatten.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | Restrict to one symbol; omit to flatten all. | |
| dry_run | No |