Use SDKs when you want typed requests, shared auth handling, WebSocket helpers, or order-book reconstruction in application code. Use REST directly for runtimes that do not have a package surface listed here.Documentation Index
Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install the package that matches your runtime.
REST usage
Call market-data routes with typed request options.
WebSocket usage
Subscribe, replay, and handle streaming messages.
Reconstruction
Maintain local books from snapshots and incremental updates.
Public SDK Packages
| Runtime | Package | Install shape | Primary fit |
|---|---|---|---|
| TypeScript / JavaScript | @0xarchive/sdk | npm install @0xarchive/sdk | Typed app clients, WebSocket helpers, and reconstruction utilities |
| Python | oxarchive | pip install oxarchive | Notebooks, research scripts, data pipelines, async calls, and optional WebSocket support |
| Rust | oxarchive | cargo add oxarchive | Async services, typed market-data clients, and optional WebSocket feature support |
SDK Selection Packet
Choose the integration surface before adding a package to an application.| Decision | Use |
|---|---|
| Runtime | Pick the listed SDK only when it matches the application runtime and dependency policy |
| Package truth | Check the package registry page, repository README, and package manifest before pinning or upgrading |
| Route visibility | Keep Hyperliquid core, Spot, HIP-3, HIP-4, and Lighter namespaces visible in code |
| Auth | Read X-API-Key from the environment or secret manager, not from browser-visible code |
| Response handling | Preserve success, data, error, and meta.request_id on returned values or exceptions |
| Streaming | Use WebSocket helpers only when the workflow needs live updates, replay, or local state |
| Reconstruction | Use reconstruction utilities when order-book state must survive diffs, gaps, and resyncs |
| Fallback | Use REST, WebSocket, CLI, or OpenAPI codegen when the listed SDK surface does not fit |
SDK Decision Rule
Use an SDK when your application benefits from typed calls, shared auth handling, connection helpers, or reconstruction utilities. Use REST directly when the runtime is small, the integration is a one-off job, or the SDK package for that runtime is not part of your dependency stack. Use OpenAPI when a coding agent or code generator needs to create a client in a language that is not covered by a first-party package. The SDK docs mirror the rest of the portal: choose the venue family first, then use the route or helper for that family. TypeScript and Python package READMEs expose Spot helpers throughclient.spot; the Rust README exposes Spot under client.hyperliquid.spot. HIP-3 and HIP-4 stay under the Hyperliquid namespace. Keep those namespaces visible in code review so wrong-family symbol bugs are easy to catch.
Production Use
Keep API keys in the environment or secret manager, preservemeta.request_id, and expose retry behavior to the caller. For WebSocket and reconstruction workflows, include a gap path and a resync path. Use the generated OpenAPI reference whenever exact route shape matters, and treat direct REST as a first-class integration path alongside SDK helpers.