Skip to main content
Use the CLI when the job belongs in a terminal: local checks, cron, CI, notebooks, incident terminals, and coding-agent shells with command access. The package is @0xarchive/cli. The binary is oxa. It requires Node.js >=18; streaming commands require Node.js 22+. Install a published package version, then confirm it with oxa --version before pinning that version in automation. The CLI uses OXA_API_KEY. Source: 0xArchiveIO/0xarchive-cli. Use this page as the shell contract: pick a venue scope, pass an explicit symbol and window, request JSON for machine consumers, and branch on exit codes instead of scraping terminal text.
1

Install the CLI

This page matches CLI version 1.10.0. For a one-off command without a global install, use the npx form shown in the auth step after the key is set.
2

Set the CLI key

3

Run one auth check

Without the global install, use npx @0xarchive/[email protected] auth test --exchange hyperliquid --symbol BTC --format json.
4

Pull one market payload

Preflight Checklist

Before wiring the CLI into a script, make these inputs explicit.

Command Model

Where The CLI Fits

Command Inventory

Automation Contract

Pagination And Failure Handling

Historical commands can return a nextCursor. Pass that value back with --cursor for the next page, and keep the original venue, symbol, window, and format arguments unchanged unless you choose a broader request. Treat stdout as the data channel and stderr as the control channel. For unattended jobs, parse JSON only from stdout, preserve any returned request_id or cursor in logs, and branch on the exit code before retrying. Validation and auth failures should stop the job; network, upstream API, and rate-limit failures can use bounded retries.

Choose Data Catalog Instead

Use Data catalog when the job is a large historical export, full backfill, Parquet workflow, or warehouse load. The CLI is strongest for point queries, moderate pulls, freshness checks, scripted probes, and terminal-native incident work.

Why 0xArchive Fits

The CLI exposes the same market-data jobs as the API in a shell shape: venue selection, symbol selection, bounded history, freshness checks, JSON output, and deterministic command failure.

Production Notes

Use the CLI when a workflow wants a command boundary: CI checks, cron jobs, notebook setup, incident response, local exports, or coding-agent terminal work. Keep command arguments explicit, prefer --format json for machine consumers, and send JSON through jq or a script instead of scraping human text. Do not use the CLI as a hidden dependency inside a long-running application server if an SDK or REST client would be easier to observe and test. The CLI is strongest when process exit codes, stdout, stderr, and shell composition are the product requirement.

Next Step

Use Choose an interface to compare CLI with MCP, Skill, SDKs, REST, and OpenAPI. Use OpenAPI when you need generated clients or route/schema contract.
Last modified on September 28, 2026