Skip to main content
Run 0xArchive market-data commands from a terminal, a cron job, CI, or a coding agent’s shell with oxa, and get JSON you can pipe into jq or a script. Pick a venue, pass an explicit symbol and window, and branch on exit codes instead of reading terminal text. The package is @0xarchive/cli and the binary is oxa. It needs Node.js >=18, including for the streaming and replay commands (oxa stream ...), and reads your key from OXA_API_KEY. Source: 0xArchiveIO/0xarchive-cli.
1

Install the CLI

These docs match CLI version 1.10.0. Confirm the installed version with oxa --version before pinning it in automation. For a one-off command without a global install, use the npx form in the auth step.
2

Set the CLI key

3

Run one auth check

Without the global install, run npx @0xarchive/cli@1.10.0 auth test --exchange hyperliquid --symbol BTC --format json.
4

Pull one market payload

Inputs

Examples

Each example runs on any plan, including Free. The candles example computes a window that ends now, inside Free’s most recent 30 days.

Commands

Use it in scripts

Parse JSON only from stdout and treat stderr as the control channel. Keep any returned request_id or cursor in your logs, and branch on the exit code before retrying: stop on validation and auth errors, and retry network, upstream, and rate-limit errors with a bounded budget. Historical commands can return a nextCursor. Pass it back with --cursor for the next page, and keep the venue, symbol, window, and format arguments unchanged.

When to use something else

The CLI fits work with a command boundary: CI checks, cron jobs, notebook setup, incident response, local pulls, and coding agents that run shell commands. Inside a long-running application, an SDK or a direct REST client is easier to observe and test than a shelled-out CLI. In an AI client that supports MCP, the MCP server gives typed tools. For a large historical export, full backfill, or warehouse load, use Parquet files from the Data Catalog.

Next step

Find the route behind any command, with its parameters and response fields, in the Endpoint reference.
Last modified on October 6, 2026