How hyperliquid-dex/hyperliquid-python-sdk works
This is a Python SDK for trading and account data on Hyperliquid. A typical workflow creates an Info client to retrieve market or user data, then uses Exchange to construct and sign an action and submit it through the shared HTTP API; callers can also subscribe to streaming updates. Exchange covers the documented example domains, including orders, transfers, staking, vaults, and deployment actions. The graph reflects the sampled source and README; unsampled method details are represented at the Exchange subsystem level.
Main entry points: api.py HTTP transport · exchange.py Trading and actions · info.py Market and account data · websocket_manager.py Subscription manager
Components 11
SDK clients
- Market and account data
hyperliquid/info.py - Trading and actions
hyperliquid/exchange.py
Protocol layer
- HTTP transport
hyperliquid/api.py - Action signing
hyperliquid/utils/signing.py - API data types
hyperliquid/utils/types.py - HTTP errors
hyperliquid/utils/error.py - Endpoint constants
hyperliquid/utils/constants.py
Streaming data
- Subscription manager
hyperliquid/websocket_manager.py
Other components
- SDK caller
- Hyperliquid HTTP API
- Hyperliquid WebSocket
Connections 11
- SDK caller → Market and account data: requests data
README.md - SDK caller → Trading and actions: submits actions
README.md - Market and account data → HTTP transport: queries through
hyperliquid/info.py - Trading and actions → HTTP transport: submits through
hyperliquid/exchange.py - Trading and actions → Market and account data: reads market data
hyperliquid/exchange.py - Trading and actions → Action signing: signs actions
hyperliquid/exchange.py - HTTP transport → Hyperliquid HTTP API: sends requests
hyperliquid/api.py - HTTP transport → HTTP errors: raises errors
hyperliquid/api.py - HTTP transport → Endpoint constants: uses endpoint
hyperliquid/api.py - Market and account data → Subscription manager: starts subscriptions
hyperliquid/info.py - Subscription manager → Hyperliquid WebSocket: connects and subscribes
hyperliquid/websocket_manager.py