Skip to content

Sync with latest Hyperliquid API (Aug 2026 drop) + transport improvements - #112

Merged
joeblau merged 7 commits into
mainfrom
api-sync-aug-2026
Aug 24, 2026
Merged

Sync with latest Hyperliquid API (Aug 2026 drop) + transport improvements#112
joeblau merged 7 commits into
mainfrom
api-sync-aug-2026

Conversation

@joeblau

@joeblau joeblau commented Aug 24, 2026

Copy link
Copy Markdown

Summary

Syncs the SDK with the Aug-2026 Hyperliquid API drop (HIP-4 outcome templates) and lands transport improvements. All changes verified against upstream nktkas/hyperliquid v0.33.3 schemas, live testnet probes, and the full offline gate (format/lint/docs/types/jsdoc/export/imports + 2034 tests, 0 fail).

Commits

  • fix(api): widen schemas to current API surface — order grouping cap 80000 → 1e8; OrderProcessingStatus/twapHistory/FrontendOpenOrder enum widenings; borrowLendUserState health states; userFees stakingLink union; UserFill/spotClearinghouseState/outcomeMeta/settledOutcome/subAccounts2/legalCheck drift.
  • feat(api): HIP-4 outcome templates, usdcRouting, new optional paramsinfo.outcomeTemplates (widened beyond upstream after live testnet probes: questionOutcome/"question" roles, uDecimal/uInt/shortString keywords), info.usdcRouting, exchange.activateOutcomeDeployer, spotDeploy outcome sub-actions, twapOrder.details, reserveRequestWeight.destination, marginTable.dex.
  • feat(transport): opt-in 429 retry and full exchange weight billingretryOnRateLimit option honoring Retry-After; exchangeWeight bills longest array at any depth (settles rate-limiter weight table: confirm protocol-exact batch keys + surcharge coverage #49 semantics).
  • feat(transport): InfoCacheTransport — opt-in TTL cache for 8 slow-changing info endpoints, param-distinct keys, in-flight dedup.
  • test: WS + SymbolConverter regression tests — audit confirmed all four upstream WS correctness fixes (refactor(transport)!: rework the WebSocket transport nktkas/hyperliquid#137) and all three SymbolConverter ports already exist in the fork; tests pin them.
  • docs — rate-limit details, retry/cache docs, known-drift entries.

Issues

Closes #98, closes #99, closes #100, closes #101, closes #102, closes #103, closes #104, closes #105, closes #106, closes #107, closes #108, closes #109, closes #110, closes #111.

Notes

  • New outcome-template shapes are documented in docs/reference/known-drift.md entry 11 — official gitbook docs haven't caught up; reconcile when they publish.
  • Live smoke tests of new endpoints passed against testnet.

- order: raise priority grouping cap to 1e8 (#99)
- widen OrderProcessingStatus, twapHistory status, FrontendOpenOrder.orderType; type TwapState.trigger (#100)
- borrowLendUserState: widen health states and healthFactor (#101)
- userFees stakingLink discriminated union; UserFill feeTrialEscrow, optional liquidatedUser (#102)
- spotClearinghouseState/outcomeMeta/settledOutcome/subAccounts2/legalCheck response drift (#103)
…104-#106)

- info.outcomeTemplates (role union + keyword formats verified against live testnet)
- info.usdcRouting (#106)
- exchange.activateOutcomeDeployer + spotDeploy outcome sub-actions; validatorL1Votes variants (#104)
- twapOrder.details (trigger/stop), reserveRequestWeight.destination, marginTable.dex (#105)
, #108)

- retryOnRateLimit: honor Retry-After with jitter, exponential fallback, bounded attempts (#107)
- exchangeWeight bills the longest array at any depth, multi-sig unwrapped; settles #49 semantics (#108)
…ehaviors (#98, #110)

Audit found all four upstream WS fixes and all three SymbolConverter ports already
present in the fork; these regression tests lock them in.
…d keep-alive

Red on main since 40c8bef: the mock never answered keep-alive pings, so the
watchdog force-reconnected mid-burst and rejected in-flight subscribes; and
paced sends (30 ms/msg) spread the 500-frame burst past the 10 s request
timeout. The mock now pongs pings, the scenario disables the timeout it is
not measuring, and echoes wait for the full burst to reach the wire.
@joeblau
joeblau merged commit aa76024 into main Aug 24, 2026
5 of 6 checks passed
@joeblau
joeblau deleted the api-sync-aug-2026 branch August 24, 2026 15:52
@joeblau joeblau mentioned this pull request Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment