Typed /
Hand it to your coding agent

One prompt with the typed-hyperliquid install command, its env vars, and a working first call. Paste it into Claude Code, Cursor, or Codex.

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, and client.streams -- perps, spot, and every documented info/exchange/stream endpoint, not just the popular ones.

Installation

pip install typed-hyperliquid

How To

Reference