Bloxwapdocs

Hyperliquid SDK

Install @bloxwap/hyperliquid and read your first market price.

@bloxwap/hyperliquid is Bloxwap's TypeScript SDK for the Hyperliquid API. Use it to query market and account data, subscribe to live updates, or submit signed exchange actions.

Project site · Documentation · GitHub · npm

Install

Use Node.js 22.12 or later, or Bun 1.3.3 or later.

npm install @bloxwap/hyperliquid

Read a price

Create an HTTP client and request market data. This example uses mainnet and needs no wallet or API key.

// 1. Import module
import { HttpTransport, InfoClient } from '@bloxwap/hyperliquid';

// 2. Set up client with transport
const transport = new HttpTransport();
const info = new InfoClient({ transport });

// 3. Query data
const mids = await info.allMids(); // mid-prices for all coins
console.log(mids.BTC);

const book = await info.l2Book({ coin: 'BTC' }); // L2 order book snapshot

For testnet, use new HttpTransport({ isTestnet: true }).

Choose a client

ClientUse it for
InfoClientMarket data, balances, positions, and open orders
SubscriptionClientLive data over WebSocket
ExchangeClientSigned actions, including orders and cancellations

Go further

The SDK site brings setup, guides, and API documentation together:

  • Installation and quick start — runtime requirements, React Native setup, and client examples.
  • Guides — market orders, agent wallets, vaults, and browser wallets.
  • Clients — HTTP requests, exchange actions, and WebSocket subscriptions.
  • Known documentation drift — verified differences between official documentation, live API behavior, and SDK types.

The SDK is a fork of nktkas/hyperliquid, released under the MIT license.

On this page