Skip to main content

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.

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.

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.
If a package or language surface is not listed here, use REST, WebSocket, CLI, or the OpenAPI contract directly.

Public SDK Packages

RuntimePackageInstall shapePrimary fit
TypeScript / JavaScript@0xarchive/sdknpm install @0xarchive/sdkTyped app clients, WebSocket helpers, and reconstruction utilities
Pythonoxarchivepip install oxarchiveNotebooks, research scripts, data pipelines, async calls, and optional WebSocket support
Rustoxarchivecargo add oxarchiveAsync services, typed market-data clients, and optional WebSocket feature support
Use OpenAPI, REST, CLI, or MCP Server when the job belongs outside those package surfaces.

SDK Selection Packet

Choose the integration surface before adding a package to an application.
DecisionUse
RuntimePick the listed SDK only when it matches the application runtime and dependency policy
Package truthCheck the package registry page, repository README, and package manifest before pinning or upgrading
Route visibilityKeep Hyperliquid core, Spot, HIP-3, HIP-4, and Lighter namespaces visible in code
AuthRead X-API-Key from the environment or secret manager, not from browser-visible code
Response handlingPreserve success, data, error, and meta.request_id on returned values or exceptions
StreamingUse WebSocket helpers only when the workflow needs live updates, replay, or local state
ReconstructionUse reconstruction utilities when order-book state must survive diffs, gaps, and resyncs
FallbackUse REST, WebSocket, CLI, or OpenAPI codegen when the listed SDK surface does not fit
The selection packet should make a dependency review easy: why an SDK is needed, which public package was checked, which route families it touches, how request IDs are exposed, and what the fallback path is if the package surface is not the right 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 through client.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, preserve meta.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.

Generated-Client Rule

SDKs are application-code surfaces. Do not describe SDKs as coding agents or protocols. Use them when the developer wants typed code inside an application; use CLI, MCP Server, Skill, or OpenAPI for the other workflow shapes.
Last modified on May 18, 2026