tradeexecutor.strategy.approval.ApprovalModel Python class in Trading Strategy framework.
- class ApprovalModel[source]#
A model that defines a checkpoint for trades before they are executd.
Approval can be get in various ways - CLI confirmation by human - Web interface confirmation by human - A third party automated risk management system
This function may wait forever and block the trade execution thread.
- confirm_trades(state, trades)[source]#
This function may wait forever and block the trade execution thread. It is up to the approval internals to decide when to timeout and what to od in such situation.
state (State) – Current portfolio management states
trades (List[TradeExecution]) – Trades suggested bt the strategy
Filtered list of trades that should be executed
- Return type: