fix(transport): route order-bound notices by request id - #759
Conversation
- Preserve originating IDs on request and order notices - Deliver classified notices to the order update stream - Keep warning-form code 399 messages informational
… data-request errors on update stream - re-export ORDER_MESSAGE_CODE from lib.rs (rustdoc gate failed: public doc linked private item) - changelog entries for Notice.request_id, 399 classification, update-stream notices - order_update_stream docs: notices surface via next()/iter(), filter_data drops them; examples show the notice arm - order-update stream skips errors owned by a data-request subscription (order_update_notice helper dedupes the sync/async guard)
|
Thanks @faysou — nice work. The 399 text-based classification and routing order errors to the update stream as typed notices are both solid improvements, and the paper TWS validation of both warning and rejection forms was exactly the right verification. I pushed a few review follow-ups to your branch (9adbc1f): re-exported |
|
Great, thank you. I did a refactor of the IB adapter in nautilus_trader but some changes belonged more naturally to rust-ibapi. Happy that these changes can be merged. |
Summary
Noticewhile keeping request‑less notices represented asNone.Warning:. Other code 399 messages remain order rejections.flowchart LR TWS[TWS error frame] --> Decode[Decode error envelope] Decode --> Classify{Request ID and severity} Classify -- Order-bound warning --> Update[Order update stream: Notice] Classify -- Order-bound error --> Update Classify -- Request-scoped --> Request[Request subscription] Classify -- Request-less --> Global[Global notice stream]Order consumers receive the request ID and severity without adding the intercepted error message type to any domain decoder.
Testing
cargo test -p ibapi --features sync.