Cover the SDK surface: webhooks, breadth, CVD, levels, and replay - #9
Merged
Merged
Conversation
New commands, each on the matching @0xarchive/sdk method: - oxa breadth current|history for Hyperliquid and HIP-3 (valuePct stays null) - oxa cvd <symbol>, cursor paged, for Hyperliquid and HIP-3 - oxa liquidations levels|levels-history and oxa orders trigger-levels|trigger-levels-history - oxa hip3 oracle external-price|discovery-bounds and oxa hip4 questions list|get - oxa wallets classify with the classification filters and offset paging - oxa symbols, filtered locally by --exchange and --symbol - oxa webhooks: event-types, limits, endpoints, deliveries, redeliver, subscriptions, estimate, dry-run, addresses, and verify. Deleting and rotating ask for confirmation or --yes; verify never prints the secret. - oxa stream replay through the SDK replay client, refusing live-only channels - oxa stream subscribe accepts orderbook_full, hip3_orderbook_full, hip4_trades, hip4_l4_diffs and hip4_l4_orders; HIP-4 coins go out as #<n> - --account on oxa l3 get and oxa l3 history Order flow paging: help, README and the --out summary describe --cursor and nextCursor. Removed flags the API ignores: --depth on l2 history and l3 history, --user/--status/--order-type on spot orders, and --user on spot trades. Fixed: large JSON output piped to another program was cut off at the pipe buffer, and closing the pipe early ended with an EPIPE stack trace. src/bin.ts is now the executable entry (bundled as dist/cli.js); src/cli.ts exports the command tree so tests parse real argument vectors.
- oxa breadth --exchange hyperliquid reads client.hyperliquid.breadth; the workaround that built the breadth resource on the core routes is gone - oxa data-quality status|coverage|incidents|incident|latency|sla|positions-freshness on the SDK dataQuality resource; coverage takes --exchange and --symbol, with --from/--to bounding a symbol's gap search - oxa spot l4-diffs and l4-history on spot.l4Orderbook.diffs()/history() - oxa hip4 outcomes by-slug and oxa outcomes by-slug on hip4.outcomes.getBySlug(), with the slug encoded for the path - --timestamp on oxa l3 get
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the CLI to parity with what
@0xarchive/sdk1.12.0 exposes. Everything lands in the unreleased 1.10.0 (no version bump); the CHANGELOG entries are under## 1.10.0 - 2026-09-28.Added
oxa breadth current|history --exchange hyperliquid|hip3hyperliquid.breadth.current()/history(),hyperliquid.hip3.breadth.current()/history()oxa cvd <symbol> --exchange hyperliquid|hip3hyperliquid.cvd.history(),hyperliquid.hip3.cvd.history()oxa liquidations levels/levels-historyliquidations.levels()/levelsHistory()(core and HIP-3)oxa orders trigger-levels/trigger-levels-historyorders.triggerLevels()/triggerLevelsHistory()(core and HIP-3)oxa hip3 oracle external-price/discovery-boundshyperliquid.hip3.oracle.externalPrice()/discoveryBounds()oxa hip4 questions list/gethyperliquid.hip4.questions.list()/get()oxa wallets classify --exchange hyperliquid|hip3wallets.classify()oxa symbols [--exchange] [--symbol]symbols.list(), filtered locallyoxa webhooks event-types,limitswebhooks.eventTypes(),limits()oxa webhooks endpoints list|create|delete|enable|rotate-secret|test|deliverieslistEndpoints(),createEndpoint(),deleteEndpoint(),enableEndpoint(),rotateSecret(),testEndpoint(),listDeliveries()oxa webhooks redeliverredeliver()oxa webhooks subscriptions list|create|update|delete|resume|resume-alllistSubscriptions(),createSubscription(),updateSubscription(),deleteSubscription(),resumeSubscription(),resumeAllSubscriptions()oxa webhooks estimate,dry-runestimate(),dryRun()oxa webhooks addresses list|add|deletelistAddresses(),addAddress(),deleteAddress()oxa webhooks verifyconstructWebhookEvent()(withparseWebhookSignatureHeader()for the signing time)oxa stream replay <channel> <symbol> --start --end [--speed] [--interval]OxArchiveWs.replay()oxa stream subscribe orderbook_full|hip3_orderbook_full|hip4_trades|hip4_l4_diffs|hip4_l4_ordersoxa data-quality status|coverage|incidents|incident|latency|sla|positions-freshnessdataQuality.status(),coverage()/exchangeCoverage()/symbolCoverage(),listIncidents(),getIncident(),latency(),sla(),positionsFreshness()oxa spot l4-diffs|l4-history <symbol>spot.l4Orderbook.diffs()/history()oxa hip4 outcomes by-slug <slug>(alsooxa outcomes by-slug)hyperliquid.hip4.outcomes.getBySlug()--accountonoxa l3 get/history,--timestamponoxa l3 getlighter.l3Orderbook.get()/history()account,timestamprotate-secretask for confirmation in a terminal, take--yesin scripts, and change nothing without either. Filters and preview configurations are wire-shaped JSON, inline or from a file.verifyreads the raw body from--body-fileor stdin, accepts repeated--secret(orOXA_WEBHOOK_SECRET) for rotations, and supports--tolerance/--ignore-timestamp. It needs no API key, never prints the secret, and scrubs it from any error.stream replaywrites every server message as NDJSON and exits 0 onreplay_completed. Live-only channels are refused before a socket opens: full-depth, HIP-3/HIP-4/Spot L4 with the SDK's own error plus a pointer to the CLI's REST command; Spot,tickerandall_tickersby the CLI.#<n>form the API expects;0returns "symbol does not exist" on the socket today.hip4_orderbook/hip4_open_interestare refused on subscribe with a pointer to replay.--cursor/--limithelp, README, andhas_more/nextCursorin the--outsummary.valuePctstaysnullin JSON and printsnullin pretty output.Removed / changed
--depthonoxa l2 historyandoxa l3 history,--user/--status/--order-typeonoxa spot orders,--useronoxa spot trades. They are now unknown-option errors.hyperliquidandhip3only. The CLI never had a trades--side.oxa trades fetch ... --limit 1000 | jqreturned 80 KB of a 600 KB document) becauseprocess.exit()ran before stdout drained. stdout and stderr are now blocking, and an early-closed pipe (| head) exits 0 instead of an EPIPE trace.src/bin.tsis the executable (still bundled asdist/cli.js);src/cli.tsexports the command tree so tests parse real argument vectors against it.Notes
oxa data-quality coveragecovers every venue by default, one venue with--exchange, and one symbol with--exchangeand--symbol(gaps and cadence;--from/--tobound the gap search).by-slugencodes the slug before handing it to the SDK, which puts it in the path as given.hip4 questionscommands use the SDK's HIP-4 client.Testing
sdk-typescriptmaster and installed from its tarball:npm run typecheck,npm test(327 passed),npm run build,npm run check:packon Node 20.20.2 and 22.23.1.--timestamp, CVD, oracle, questions, wallets, symbols, liquidation and trigger levels, L3--account, webhookevent-types/limits/ list commands /estimate/dry-run, a trades replay, andorderbook_full,hip3_orderbook_full, and HIP-4 live subscriptions. No webhook write command was run against the API; those are covered by tests with the SDK stubbed.Supersedes #2 and #6.