Am/hypercore rest expansion - #1555
Conversation
🔗 Preview Mode
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bb65012ca
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| | data[].time | integer | Trade time in milliseconds. | | ||
| | data[].hash | string | Layer-1 transaction hash for the trade. | | ||
| | data[].tid | integer | Trade identifier. | | ||
| | data[].users | array | Buyer and seller addresses, in that order. | |
There was a problem hiding this comment.
Describe trade participants as maker and taker
The native trades payload orders users as maker then taker, not buyer then seller. For a buy-side taker, the maker is the seller, so consumers following this description will reverse the two addresses and misattribute trades. Document the tuple as [maker, taker] and use side when buyer/seller attribution is needed.
Useful? React with 👍 / 👎.
| - portfolioState | ||
| - extraAgents |
There was a problem hiding this comment.
Remove purpose-built composites from the
/info enum
Because InfoTypeRequest is the request schema for POST /{apiKey}/info, these enum members advertise portfolioState and extraAgents as valid /info discriminators. The same change documents them as purpose-built reads at /portfolio-state and /extra-agents, and they are not native /info types, so generated clients and the API explorer can construct requests that the endpoint rejects. Remove these values from this enum or expose actual /info aliases.
Useful? React with 👍 / 👎.
… and market deployment pages
2bb6501 to
5e81dd3
Compare
Description
HyperCore private-preview documentation. Contract work rather than formatting.
The REST reference expands from 8 documented operations to roughly 45 native-compatible
reads, grouped into eleven resource families. Request parameters, response-field
contracts, and populated examples are sourced from the Hyperliquid Foundation's
/infodocumentation, Alchemy's published Info endpoint page, and live probes against the
native API. Adds three new pages and unifies the order-book bootstrap model across the
stateful stream pages, which previously described incompatible procedures on WebSocket
versus gRPC.
Pages stay out of nav and site search via
hidden: trueon the two net-new top-levelsections; direct URLs resolve. A customer is actively reading these docs and the node
peering page is under external review.
Related Issues
No Linear ticket — this was authored directly rather than through docs-agent. Follows
the branch-and-PR workflow in the Docs Contribution Guide.
Changes Made
REST reference (36 new pages, 11 sections)
context, metadata, token deployment, vaults, staking/delegation/validators,
roles/agents/limits, and outcome markets
flattening:
userRole(5),metaAndAssetCtxs,activeAssetData, anduserFunding(first perpetual DEX vs HIP-3)
oraclePxdocumented onmetaAndAssetCtxsas the native path to a current oracleprice, cross-referenced from the
setOracleUpdatesstreamNew pages
tradesWebSocket streamStream pages
l2BookDiff,l4BookUpdates, andtpslUpdateson both transports, plus both book guidesNavigation (
content/docs.yml)hidden: truetop-level sections in thechainstab, siblings ofHyperCore gRPCtradesadded to the existing HyperCore Streams blockREST APIsection,alongside the generated
api:block rather than replacing itKnown and deliberate
native API accepted the request but returned only empty payloads
confirmation; the REST snapshot path remains documented as the alternative
Testing
pnpm run validate)pnpm generate,pnpm generate:rest,pnpm validate,pnpm validate:rest,pnpm validate:docs-yml, andgit diff --checkall pass.pnpm lintexits non-zero on a single pre-existing TypeScript error already onmain:src/content-indexer/visitors/processors/__tests__/process-openapi.test.ts(507,32),Property 'path' does not exist on type 'NavItem'. No content failure contributes.This is a content-only repo with no local dev server, so the PR preview is the
authoritative render check.