Pit Officer blog
Engineering articles about pre-trade risk, trading systems, and order controls.
- Latest
Articles
- 10 min read
Why your trading bot's position drifts from the broker's
A trading bot's position is the confirmed filled quantity plus the open quantity of every order without a final outcome. Track cumulative fills per order, rebuild after a reconnect by buffering the stream before the snapshot, and check new orders against the worst side of that range.