Skip to content

Fix trade websocket payload types - #328

Open
koriyoshi2041 wants to merge 1 commit into
hyperliquid-dex:masterfrom
koriyoshi2041:fix/trade-wire-types
Open

koriyoshi2041 wants to merge 1 commit into
hyperliquid-dex:masterfrom
koriyoshi2041:fix/trade-wire-types

Conversation

@koriyoshi2041

Copy link
Copy Markdown

Closes #327.

The live trades websocket payload represents sz as a string and includes tid and a two-user tuple. The official Rust SDK models the same payload as sz: String, tid: u64, and users: (String, String), so this updates the Python Trade TypedDict to match that wire contract.

Validation:

  • uvx mypy hyperliquid/utils/types.py
  • uvx black --check hyperliquid/utils/types.py
  • python -m compileall -q hyperliquid/utils/types.py
  • git diff --check

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.

Trade TypedDict does not match live trades payload

1 participant