Skip to content

Commit a4c8d2e

Browse files
jaredmcqueenclaude
andcommitted
fix: match user_order (singular) message type from API
The Kalshi WS API sends type="user_order" (singular) for order updates, not "user_orders". Add the singular form to the routing match arm. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5f6d741 commit a4c8d2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ws/message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ impl StreamMessage {
732732
"order_group_updates" => serde_json::from_value::<OrderGroupUpdateData>(value)
733733
.map(StreamMessage::OrderGroupUpdate),
734734
// User order update notifications
735-
"user_orders" => serde_json::from_value::<UserOrderData>(value)
735+
"user_order" | "user_orders" => serde_json::from_value::<UserOrderData>(value)
736736
.map(|d| StreamMessage::UserOrder(Box::new(d))),
737737
// Multivariate lookup notifications
738738
"multivariate_lookup" => serde_json::from_value::<MultivariateLookupData>(value)

0 commit comments

Comments
 (0)