Define your aggregation
Separate taker and maker sides before aggregating by market and token. Summing all fills can double-count volume; prices cannot simply be added.
Combine book and inventory
Order flow may inform quote skew, spreads and size, but does not replace the order book. Apply inventory and market exposure checks to every change.
Expire unconfirmed signals
A connection gap means unknown data, not zero activity. Expire stale signals and reconcile with confirmed trades.