prune_state#
API documentation for tradeexecutor.cli.commands.prune.prune_state Python function.
- prune_state(id=<typer.models.OptionInfo object>, strategy_file=<typer.models.OptionInfo object>, state_file=<typer.models.OptionInfo object>, unit_testing=<typer.models.OptionInfo object>)[source]#
Prune unnecessary data from state to reduce state file size.
This command removes accumulated data from the state file that is no longer needed for trading operations.
The command will: 1. Create a backup of the current state file 2. Load the state 3. Remove unnecessary data properties from all closed positions 4. Save the pruned state 5. Report pruning statistics
Only closed positions are affected - open positions are left unchanged.