repair#
API documentation for tradeexecutor.state.repair Python module in Trading Strategy.
Module description#
Maanually repair broken states.
Recover from failed trades
Trade failure modes may include
Broadcasted but not confirmed
Broadcasted, confirmed, but not marked as executed
Executed, failed
Failure trades may be
Buy e.g. first trade failed: open position -> closed position, allocated capital returned
Sell e.g. closing trade failed: position stays open, the assets are marked to be available for the future sell
Classes#
The report of the repair results. |
Functions#
|
Make a trade that closes the position. |
|
|
|
Make a virtual trade that fixes the total balances of a position and unwinds the broken trade. |
|
|
|
Repair a trade. |
|
Repair trade. |
|
Repair a trade which failed to generate new transactions.. |
|
Repair command to fix trades that did not generate tranasctions. |
|
Attempt to unfreeze positions. |