Expand description
WebSocket message dispatch for the Polymarket execution client.
Routes user-channel WS messages (order updates and trades) for orders submitted through this
client into Nautilus order events (OrderAccepted / OrderFilled / OrderFillVoided /
OrderCanceled / OrderRejected / OrderExpired), building them from the identity captured at
submit (OrderIdentityRegistry). Order-channel messages drive lifecycle events; trade-channel
messages drive fills, and acceptance is synthesized before a fill or cancel that races ahead.
Messages are emitted once the order is known (accepted, or with a submit in flight), otherwise
buffered until acceptance. Reports are reserved for the generate_* query and reconciliation
methods. Trade fills are emitted at MATCHED, retained until terminal settlement, and reversed
with OrderFillVoided if the trade reaches FAILED.