Skip to main content
The Hyperliquid API is REST over HTTPS with JSON bodies, in snake_case, plus a WebSocket for account and maker updates and a market data socket for public prices. It is separate from the Solana API and has its own keys.

Base URL

Every route runs on HyperEVM, chain ID 999.

Try it without a key

Market reads are public:

Authentication

Send your API key as a bearer token on every authenticated request:
Each key acts for one account, yours or a maker’s, and holds scopes. Calls that move funds also carry a wallet signature in the body. Keys, scopes and signing are on Authentication & signing.

Requests

  • A command POST sends an Idempotency-Key header, a new lowercase UUIDv7 per command. A few routes take none.
  • Amounts are strings in USDC atomic units (6 decimals): "25000000" is 25 USDC. Never a JSON number.
  • Large identifiers (outcome_id, chain, block) are decimal strings.
The full encoding table and the idempotency exceptions are on Errors, pagination & limits.

Responses

A successful response is the resource itself, with no envelope. A 204 has no body. A list returns its rows in items and pages by cursor:
Send next_cursor back as ?cursor= until has_more is false. Cursors are opaque, so do not parse or build them. Page size rules are on Pagination.

Errors

Every HTTP error has the same shape:
Branch on error.code, never on error.message, and follow retry. A WebSocket closes with a close code and the error code as its reason instead. Every code is on Errors.

Rate limits

Over quota returns 429 RATE_LIMITED with Retry-After in seconds. The per-route limits are on Rate limits.

Endpoints by task

Taking

Making

The full maker loop is on Market making.

Endpoint groups

Markets

HIP-4 markets, their sides and price history. Public.

RFQs & Quotes

Request quotes and accept one as a taker, or quote and confirm as a maker.

Positions

Positions you hold or your maker backs, and cash-outs.

Account

Identity, balances, activity, operations and withdrawals.

Makers

Maker capital and collateral.

Deployment

The chain, vault and fees every signature binds to.

WebSocket

Account and maker updates, resumable from a cursor.

Errors

Every code, limit and rate limit, and which errors to retry.