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
1.12.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
npx @0xarchive/[email protected] 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.Read one bounded window
Resolve the market first, then request one bounded window and keep the actual returned timestamps. WithSTART_MS and END_MS set to yesterday’s first ten UTC minutes in epoch milliseconds, oxa trades fetch --exchange lighter --symbol BTC --start "$START_MS" --end "$END_MS" --limit 50 --format json reads finalized Lighter mainnet trades for that window. It needs an installed oxa and an API key in OXA_API_KEY.
Save meta.finalized_through and the returned nextCursor. Without --start and --end, the same command reads the recent tier, which stays preliminary until the finalization watermark passes it. Empty data is not automatically zero activity: check coverage, finalization, entitlement, pagination and the identifier before concluding that nothing traded.
Commands
Use it in scripts
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.