This PR includes 3 changes:
- Separate the logic in the client order tracker and the generic inflight order to process trade fills separate from the order update. The correct way to use the trade fill now is to process a TradeUpdate. A trade fill will not be automatically generated any more when processing an OrderUpdate.
- Improve the client order tracker to not process an OrderUpdate that will mark the order as completely filled until all fill updates have been processed (until the order is filled regarding the amount too). This is to avoid errors in the order complete event in exchanges that send the order complete event before the last order fill event.
- Include information about already processed order fills when storing an order as JSON, and when recovering it from JSON, to avoid processing repeated fills twice in a recovered order.
Link: https://github.com/hummingbot/hummingbot/pull/5120