Skip to content

fix(ws): add trigger fields to BasicOrder websocket updates#193

Open
knoal wants to merge 1 commit into
hyperliquid-dex:masterfrom
knoal:fix/ws-basic-order-trigger-fields-192
Open

fix(ws): add trigger fields to BasicOrder websocket updates#193
knoal wants to merge 1 commit into
hyperliquid-dex:masterfrom
knoal:fix/ws-basic-order-trigger-fields-192

Conversation

@knoal
Copy link
Copy Markdown

@knoal knoal commented Jun 1, 2026

Summary

  • add the missing trigger/order metadata fields to websocket BasicOrder
  • align websocket BasicOrder more closely with REST BasicOrderInfo
  • add deserialization tests covering trigger-order payloads and null tif

What changed

src/ws/sub_structs.rs

  • added:
    • trigger_condition: String
    • is_trigger: bool
    • trigger_px: String
    • is_position_tpsl: bool
    • reduce_only: bool
    • order_type: String
    • tif: Option<String>

Why

WebSocket OrderUpdate payloads were missing fields that are already present in REST BasicOrderInfo, which made it hard to identify trigger orders and inspect TP/SL-related metadata from real-time order updates alone.

This brings websocket order updates in line with the data already available through REST and avoids forcing consumers to poll for order details.

Validation

  • cargo fmt
  • cargo test
  • cargo clippy -- -D warnings

Closes #192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebSocket BasicOrder missing trigger fields present in REST BasicOrderInfo

1 participant