# hlz — Zig Tooling for Hyperliquid ## Docs - [Benchmarks](/benchmarks): Measured on Apple M4, median of 10,000 iterations (100,000 for sub-µs ops). Take these with a grain of salt — different machines, different compilers, different results. - [App](/tui/app): `App.zig` manages the frame lifecycle — the entry point for any TUI application. - [Buffer](/tui/buffer): `Buffer.zig` is a double-buffered cell grid for flicker-free terminal rendering. - [TUI Framework](/tui): hlz includes a standalone TUI framework for building terminal applications. It has no SDK dependency — you can use it for anything. - [Layout](/tui/layout): `Layout.zig` is a two-pass constraint layout engine for dividing terminal space. - [Terminal](/tui/terminal): `Terminal.zig` handles raw mode, terminal size detection, and input. - [Widgets](/tui/widgets): `List.zig` — Scrollable list with search, sort, and pagination. - [Terminal Architecture](/terminal/architecture): The trading terminal is a ~2,200 line single-file module (`src/terminal/trade.zig`) using the numbered-section pattern. - [Trading Terminal](/terminal): `hlz-terminal` (or `hlz trade`) is a full-featured trading terminal for Hyperliquid. - [Keybindings](/terminal/keybindings): When viewing markets, perps, spot, or other list views: - [HTTP Client](/sdk/client): The SDK client provides typed access to all Hyperliquid HTTP endpoints. - [Decimal Math](/sdk/decimal): hlz includes a 38-digit decimal type for precise financial arithmetic. No floating-point errors. - [SDK Overview](/sdk): Zig library for Hyperliquid with typed API responses. Signing adapted from [zabi](https://github.com/Raiden1411/zabi)'s EIP-712 and ECDSA implementation. - [Signing](/sdk/signing): hlz implements two signing paths, matching the Hyperliquid protocol. The secp256k1 and EIP-712 implementation is adapted from [zabi](https://github.com/Raiden1411/zabi). - [Types](/sdk/types): Core types for orders, actions, and responses. - [WebSocket](/sdk/websocket): Real-time market data and user event streaming via WebSocket. - [Configuration](/introduction/configuration): hlz needs a private key for trading operations. Market data commands work without auth. - [Getting Started](/introduction/getting-started): hlz gives you three things: - [Installation](/introduction/installation): Auto-detects OS and architecture, then installs to: - [Agent Payments](/guides/agent-payments): Transfers on Hyperliquid are free and settle in under a second. No gas, no approval transactions. That makes it practical for agent-to-agent payments, even tiny ones. - [Guides](/guides): Step-by-step guides for common tasks. - [Streaming Market Data](/guides/streaming): Real-time data from Hyperliquid via WebSocket. - [Building a Trading Bot](/guides/trading-bot): This guide shows how to build a simple trading bot using the `hlz` CLI and shell scripting. For complex bots, use the Zig SDK directly. - [Account](/cli/account): Account commands show positions, orders, fills, and balances. They require an address — either via `--address`, `HL_ADDRESS`, config file, or derived from your key. - [Agent Integration](/cli/agent-integration): hlz is designed for AI agents and automated workflows. Every command works non-interactively with structured output. - [CLI Overview](/cli): `hlz` is a 38-command CLI for Hyperliquid. 827KB static binary, zero config required for market data. - [Key Management](/cli/keys): hlz stores keys in encrypted keystores, compatible with Foundry's format. - [Market Data](/cli/market-data): All market data commands work without authentication. - [Streaming](/cli/streaming): Real-time WebSocket streams. Data flows continuously until you Ctrl+C. - [Trading](/cli/trading): All trading commands require authentication. See [Configuration](/introduction/configuration). - [Transfers](/cli/transfers): Send tokens between addresses and between balance contexts (perp ↔ spot).