API documentation for tradeexecutor.state.freeze.freeze_position_on_failed_trade Python function.
- freeze_position_on_failed_trade(ts, state, trades)#
Move positions of failed sell trades to freeze list.
Iterate through all resolved trades. If any of the trades is failed, freeze its trading position and move the position under the frozen position management. Any base tokens will be added to the blacklist.