Quicknode logoBuilt on Quicknode infrastructure

Hyperliquid API

One line to trade Hyperliquid.Your keys never leave your machine.

4 SDKs
Zero custody
Perps & Spot
HIP-3 Markets
pip install hyperliquid-sdk
from hyperliquid_sdk import HyperliquidSDK

sdk = HyperliquidSDK(endpoint, private_key=key)

# Market buy $100 of BTC
order = sdk.market_buy("BTC", notional=100)
print(f"Filled {order.filled_size} @ ${order.avg_price}")

Everything you need

Trading, streaming, market data — one SDK, four languages

One-Line Trading

Market orders, limits, stops — all in a single call

sdk.market_buy("BTC", notional=100)

Zero Custody

Sign locally. Your keys never leave your machine

# Private key stays local

Real-Time Streaming

WebSocket and gRPC for live trades and order books

sdk.stream.trades(["BTC"], callback)

Full Market Data

Prices, order books, positions, candles — all included

sdk.info.l2_book("ETH")

HIP-3 Markets

Trade community perpetuals with the same API

sdk.buy("xyz:SILVER", notional=11)

Advanced Orders

TWAP, triggers, stop loss, take profit built-in

sdk.twap_order("BTC", size=0.1, ...)

REST API

Build without signature, send with signature. Click any endpoint to try it.

Exchange — Build (no signature)

Exchange — Send (with signature)

Enhanced Endpoints

Error Codes

Every error uses the appropriate HTTP status code and includes error, message, and guidance with exactly what to do next.

HTTPError Code
403NOT_APPROVED
422BUILDER_MISMATCH
422SIGNATURE_INVALID
422HL_EXCHANGE_*
400INVALID_JSON
422INVALID_PARAMS
500INTERNAL_ERROR

Fees

Two fees apply per trade: our builder fee (injected into your order) and Hyperliquid's exchange fee (maker/taker, charged by the protocol).

Builder Fee— charged by us, injected into each order
MarketFeeProtocol Max
Perpetuals0.04%0.1%
Spot0.05%1%
Exchange Fee— charged by Hyperliquid, based on your volume tier
MarketTakerMaker
Perpetuals0.045%0.015%
Spot0.070%0.040%

You approve a maxFeeRate ceiling (e.g. "1%") for the builder fee. The actual builder fee is always within your approved limit. You can revoke at any time.

FAQ

Common questions about Hyperliquid API.

Hyperliquid API is a zero-custody REST builder API for Hyperliquid, built by Quicknode. It lets you trade perpetuals, spot, and HIP-3 markets programmatically while your private keys never leave your machine.

Every trade follows three steps: (1) Build — construct your order parameters locally, (2) Sign — sign the transaction with your private key on your machine, (3) Send — submit the signed payload to the Hyperliquid API endpoint. Your private key is never transmitted.

Hyperliquid API charges a builder fee of 0.04% on perpetual trades and 0.05% on spot trades. These are on top of Hyperliquid's native exchange fees.

No. Hyperliquid API is fully non-custodial. You sign every transaction locally with your own private key. The API only forwards your pre-signed transactions to Hyperliquid. Your keys never leave your machine.

Hyperliquid API provides examples and SDK support for Python, TypeScript, and Rust. The API uses a REST API over HTTPS, so any language with an HTTP client can integrate.

You can trade perpetuals (perps), spot markets, and HIP-3 markets on Hyperliquid through the API. All order types supported by Hyperliquid are available.

Yes. Hyperliquid API by Quicknode is a production-ready REST API for trading on Hyperliquid. It supports perpetuals, spot, and HIP-3 markets with a non-custodial build-sign-send pattern. You sign locally and the API forwards your pre-signed transactions to Hyperliquid.

Use the Hyperliquid API to build a trading bot in Python, TypeScript, or Rust. Call the order endpoint with your parameters, sign the payload with your private key locally, and submit via HTTPS. The API handles routing to Hyperliquid while you retain full custody of your keys.

Send REST API requests to the Hyperliquid API over HTTPS. Build your order parameters, sign the transaction locally with your private key, and call the send endpoint. The API supports market, limit, and trigger orders for perpetuals, spot, and HIP-3 markets.

A builder fee is a small fee charged by Hyperliquid API infrastructure providers on top of Hyperliquid's native exchange fees. Hyperliquid API charges 0.04% on perpetual trades and 0.05% on spot trades. Builder fees are set by the API provider, not by Hyperliquid itself.

To cancel an order through Hyperliquid API, send a cancel request with the order ID, sign it locally with your private key, and submit. To modify, cancel the existing order and place a new one. Both operations follow the same build-sign-send pattern as placing orders.

HIP-3 is Hyperliquid's protocol for permissionless spot token deployment and liquidity. Through the Hyperliquid API, you can trade HIP-3 tokens programmatically alongside perpetuals and standard spot markets. HIP-3 markets use the same REST API endpoints as other order types.

No. Hyperliquid API is fully non-custodial — your private key never leaves your machine. You sign every transaction locally and only send the signed payload to the API. The server cannot execute trades without your cryptographic signature.