flatten_positions
Flatten all open positions via opposite-side market orders. Supports optional symbol filtering. Default dry-run mode enables safe end-of-day flattening.
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 |