
Security News
n8n Tops 2025 JavaScript Rising Stars as Workflow Platforms Gain Momentum
n8n led JavaScript Rising Stars 2025 by a wide margin, with workflow platforms seeing the largest growth across categories.
@nktkas/hyperliquid
Advanced tools
Hyperliquid API SDK for all major JS runtimes, written in TypeScript.
A community-supported Hyperliquid API SDK for all major JS runtimes, written in TypeScript.
npm i @nktkas/hyperliquid
pnpm add @nktkas/hyperliquid
yarn add @nktkas/hyperliquid
deno add jsr:@nktkas/hyperliquid
// 1. Import module
import { HttpTransport, InfoClient } from "@nktkas/hyperliquid";
// 2. Set up client with transport
const transport = new HttpTransport();
const info = new InfoClient({ transport });
// 3. Query data
// Retrieve mids for all coins
const mids = await info.allMids();
// Retrieve a user's open orders
const openOrders = await info.openOrders({ user: "0x..." });
// L2 book snapshot
const book = await info.l2Book({ coin: "BTC" });
// 1. Import modules
import { ExchangeClient, HttpTransport } from "@nktkas/hyperliquid";
import { privateKeyToAccount } from "viem/accounts";
// 2. Set up client with wallet and transport
const wallet = privateKeyToAccount("0x...");
const transport = new HttpTransport();
const exchange = new ExchangeClient({ transport, wallet });
// 3. Execute an action
// Place an order
const result = await exchange.order({
orders: [{
a: 0,
b: true,
p: "95000",
s: "0.01",
r: false,
t: { limit: { tif: "Gtc" } },
}],
grouping: "na",
});
// Update leverage
await exchange.updateLeverage({ asset: 0, isCross: true, leverage: 5 });
// Initiate a withdrawal request
await exchange.withdraw3({ destination: "0x...", amount: "1" });
// 1. Import module
import { SubscriptionClient, WebSocketTransport } from "@nktkas/hyperliquid";
// 2. Set up client with transport
const transport = new WebSocketTransport();
const subs = new SubscriptionClient({ transport });
// 3. Subscribe to events
// Subscribe to mids for all coins
await subs.allMids((data) => {
console.log(data);
});
// Subscribe to user's open orders
await subs.openOrders({ user: "0x..." }, (data) => {
console.log(data);
});
// Subscribe to L2 book snapshot
await subs.l2Book({ coin: "ETH" }, (data) => {
console.log(data);
});
FAQs
Hyperliquid API SDK for all major JS runtimes, written in TypeScript.
The npm package @nktkas/hyperliquid receives a total of 57,150 weekly downloads. As such, @nktkas/hyperliquid popularity was classified as popular.
We found that @nktkas/hyperliquid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
n8n led JavaScript Rising Stars 2025 by a wide margin, with workflow platforms seeing the largest growth across categories.

Security News
The U.S. government is rolling back software supply chain mandates, shifting from mandatory SBOMs and attestations to a risk-based approach.

Security News
crates.io adds a Security tab backed by RustSec advisories and narrows trusted publishing paths to reduce common CI publishing risks.