Engineering · TRUEFIX LABS
Reconciling Orders, Fills and Positions in Trading Systems
Why production trading systems combine WebSocket events, REST snapshots, trade history, balances, and periodic reconciliation.
Short answer. Reliable reconciliation combines WebSocket events for low-latency updates with REST snapshots and periodic comparison. Use open orders, order history, trade history, positions, balances, and account equity to detect missed events, duplicate events, position drift, and unknown execution results.
Required views
- Open orders
- Order history
- Trade or fill history
- Positions
- Balances and account equity
Reconciliation loop
WebSocket events
+ REST snapshot
+ periodic reconciliation
→ compare → classify drift → recover → record evidenceClassify differences as expected latency, missing event, duplicate event, provider correction, local bug, or unresolved ambiguity.
Position calculation
Calculate from fills and provider position snapshots, including fees, settlement currency, contract multiplier, realized and unrealized P&L, transfers, and corporate actions where relevant. Do not assume every venue reports the same sign or quantity convention.
Recovery policy
Pause affected execution when drift is material or identity is ambiguous. A reconciliation result should include the snapshot timestamp, source, comparison revision, and operator action.
Sources
Last verified: 2026-09-28. Provider capabilities can change by region, account, product, environment, and entitlement; verify the linked official documentation before production use.
Last updated: 2026-09-28