From a632a77b2ad1bff6b956e596605c216c4898ccaf Mon Sep 17 00:00:00 2001 From: kigland Date: Fri, 9 Oct 2026 13:02:49 +0800 Subject: [PATCH] Fix trade websocket payload types --- hyperliquid/utils/types.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hyperliquid/utils/types.py b/hyperliquid/utils/types.py index 14dc67b..0d114e4 100644 --- a/hyperliquid/utils/types.py +++ b/hyperliquid/utils/types.py @@ -78,7 +78,19 @@ BboData = TypedDict("BboData", {"coin": str, "time": int, "bbo": Tuple[Optional[L2Level], Optional[L2Level]]}) BboMsg = TypedDict("BboMsg", {"channel": Literal["bbo"], "data": BboData}) PongMsg = TypedDict("PongMsg", {"channel": Literal["pong"]}) -Trade = TypedDict("Trade", {"coin": str, "side": Side, "px": str, "sz": int, "hash": str, "time": int}) +Trade = TypedDict( + "Trade", + { + "coin": str, + "side": Side, + "px": str, + "sz": str, + "hash": str, + "time": int, + "tid": int, + "users": Tuple[str, str], + }, +) CrossLeverage = TypedDict( "CrossLeverage", {