6. What happens when something fails
Last updated:
The engine does not replay memorised steps: on every cycle it computes which orders should exist and compares them with the ones actually on the venue. It only executes the difference. Three properties follow:
- It recovers on its own. A restart, a dropped WebSocket or an order you cancel by hand: the next cycle converges again.
- It does not duplicate positions. Every order carries a deterministic id and fills are deduplicated. A retry after a timeout does not open the position twice.
- It respects what is not its own. If you trade by hand in the same account, those orders are left alone.