flatten_positions
Close all open positions with market orders, optionally by symbol. Designed for end-of-day flatten or emergency exits.
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 |