Repository navigation
docs(examples): add hyperliquid-examples-nodejs.md (one page of copy-ready snippets) - #19
Open
harbourlark wants to merge 1 commit into
Open
harbourlark wants to merge 1 commit into
harbourlark wants to merge 1 commit into
Conversation
… WS API This document provides comprehensive examples for using the Hyperliquid API with Node.js, JavaScript, and TypeScript. It includes installation instructions, client creation, API usage for market data, account data, trading, and WebSocket subscriptions.
This was referenced Nov 27, 2026
This branch has not been deployed
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.
Adds
examples/hyperliquid-examples-nodejs.md, a single page of short, copy-ready snippets in the same style askucoin-api/examples/kucoin-*-examples-nodejs.md.Why: Context7 parses markdown, and its benchmark for /sieblyio/hyperliquid-api is still 0 after the 27 Nov refresh ("low doc coverage"), while kucoin-api (with the examples markdown files) scores 73.88. The runnable
.tsexamples stay as they are; this page gives indexers and readers one place to find each task.Covers: client setup (public, private key, API wallet with accountAddress, vault), Info market data (mids, L2 book, candles, trades, perp/spot metadata, resolveAsset/nameToCoin, funding history, predicted funding, exchange status), account reads (balances, positions for any address, open orders, fills by time, order status by oid/cloid, funding payments, ledger updates, rate limit), trading (GTC limit with cloid, market order and market close with expiresAfter, spot order, normalTpsl entry + TP/SL, trailing stop, modify, cancel by oid/cloid, cancel all, schedule cancel, leverage and isolated margin, TWAP), user-signed actions (approve API wallet, spot/perp USDC transfer, send, withdraw), WebSocket public and account streams, unsubscribe, WebSocket API, and error handling.
Checked against @siebly/hyperliquid-api 1.0.5:
tsc --strict(module nodenext).connectionTimeout: 5000, because with the 1000 ms default the first handshake from my test box timed out before reconnecting.Prices and sizes in the trading snippets mirror the existing examples (far from market, around the $10 minimum).