feat(ws): extend TradeMessage with full trade execution fields

TradeMessage was severely under-specified compared to the Polymarket WS
API. Add missing fields needed by the engine: taker_order_id,
maker_orders, trader_side, fee_rate_bps, outcome, owner, trade_owner,
transaction_hash. Replace untyped status/msg_type strings with proper
TradeMessageStatus and TradeMessageType enums.
This commit is contained in:
Andrey Kuznetsov
2026-02-15 21:19:54 +00:00
parent 0280d537ae
commit 4d6ba2ab5c
4 changed files with 225 additions and 4 deletions
+9 -1
View File
@@ -623,11 +623,19 @@ impl PolyfillDemo {
side: Side::BUY,
size: dec!(50.0),
price: dec!(0.75),
status: Some("MATCHED".to_string()),
status: TradeMessageStatus::Matched,
msg_type: None,
last_update: None,
matchtime: None,
timestamp: None,
outcome: None,
owner: None,
trade_owner: None,
taker_order_id: None,
maker_orders: vec![],
fee_rate_bps: None,
transaction_hash: None,
trader_side: None,
}),
];