Typed Hyperliquid
A fully typed, validated async client for the Hyperliquid API.
from typed_hyperliquid import Hyperliquid
async with Hyperliquid.new(public=True) as client:
async with client.streams.trades('BTC') as trades:
async for msg in trades:
for trade in msg:
print(trade['px'], trade['sz'], trade['side'])Why Typed Hyperliquid?
- 🎯 Precise Types: Typed endpoint inputs and responses, not
dict/Any. - ✅ Runtime Validation: Responses validated by default, not just typed on paper.
- ⚡ Async First: HTTP, request-response WebSocket, and subscription streams, built for concurrent workflows.
- 📚 Full Surface:
client.info,client.exchange, andclient.streams-- perps, spot, and every documented info/exchange/stream endpoint, not just the popular ones.
Installation
pip install typed-hyperliquidHow To
- Place & Manage Orders
- Fetch Market Data
- Fetch Your Balances & Positions
- Fetch Your Transactions
- Listen To Your Trades
- Listen To Public Data