Track market orders to prevent unknown order warnings and update UI #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Market orders placed after limit order timeout were not being tracked, causing websocket updates to log warnings for "unknown orders" and preventing the UI from showing final fill status.
Changes
Modified order tracking logic (
HyperliquidBroker.cs):IsCompleted()check fromAddOrderTracker()to allow tracking already-filled ordersMarket orders fill immediately and have terminal status upon creation, but still receive websocket updates that need to be matched for UI updates and proper lifecycle management.
This ensures websocket updates are matched to trackers, allowing the UI to display correct order status before exit.
Original prompt
This section details on the original issue you should resolve
<issue_title>Fix Log Warnings For Market Orders</issue_title>
<issue_description>Currently market orders are not tracked in the app, which has two consequences:
We should change this so that market orders are tracked and status updates returned to the client code in Program, so that the screen can be updated and the app shows the correct order status before exiting.
Log extract follows: