Tree-shaking
Import
// Granular imports (tree-shakeable)
import { clearinghouseState } from "@nktkas/hyperliquid/api/info";
import { order } from "@nktkas/hyperliquid/api/exchange";
import { candle } from "@nktkas/hyperliquid/api/subscription";Usage
import { HttpTransport } from "@nktkas/hyperliquid";
import { order } from "@nktkas/hyperliquid/api/exchange";
import { privateKeyToAccount } from "viem/accounts";
const transport = new HttpTransport();
const wallet = privateKeyToAccount("0x...");
// Function takes config as first argument
const result = await order(
{ transport, wallet },
{
orders: [{
a: 0,
b: true,
p: "30000",
s: "0.1",
r: false,
t: { limit: { tif: "Gtc" } },
}],
grouping: "na",
},
);Info Functions
Exchange Functions
Subscription Functions
Available Exports
Export Path
Description
Valibot Schemas
Available Schemas
Use Cases
Last updated