Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

@nktkas/hyperliquid

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nktkas/hyperliquid

Hyperliquid API SDK for all major JS runtimes, written in TypeScript.

Source
npmnpm
Version
0.30.2
Version published
Weekly downloads
72K
19.24%
Maintainers
1
Weekly downloads
 
Created
Source

Hyperliquid API TypeScript SDK

npm jsr Downloads coveralls bundlephobia

@nktkas/hyperliquid is a TypeScript SDK for the Hyperliquid API.

Features

  • 🖋️ Typed: Source code is 100% TypeScript.
  • 🧪 Tested: Good code coverage and type relevance.
  • 📦 Minimal dependencies: A few small trusted dependencies.
  • 🌐 Cross-Environment Support: Compatible with all major JS runtimes.
  • 🔧 Integratable: Easy to use with wallet providers (viem or ethers).

Installation

npm i @nktkas/hyperliquid

Quick Example

import { ExchangeClient, HttpTransport, InfoClient } from "@nktkas/hyperliquid";
import { privateKeyToAccount } from "viem/accounts";

// Read data
const info = new InfoClient({ transport: new HttpTransport() });
const mids = await info.allMids();
console.log(mids); // { "BTC": "97000.5", "ETH": "3500.25", ... }

// Place order
const exchange = new ExchangeClient({
  transport: new HttpTransport(),
  wallet: privateKeyToAccount("0x..."),
});

const result = await exchange.order({
  orders: [{
    a: 0, // Asset index (BTC)
    b: true, // Buy side
    p: "95000", // Price
    s: "0.01", // Size
    r: false, // Reduce only
    t: { limit: { tif: "Gtc" } },
  }],
  grouping: "na",
});

Documentation

📚 Read the full documentation

Star History

Star History Chart

Keywords

api

FAQs

Package last updated on 01 Jan 2026

Did you know?

Socket

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.

Install

Related posts