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. Staging runs the same API on testnet, chain ID 998. Incidents and planned maintenance on each surface are posted on status.totalis.trade.

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. A user who signs in with their own wallet on a partner’s site sends a wallet session token the same way, with the Origin it signed in from on every request. 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. Most lists return their rows in items; a few name them after the resource (rfqs, operations, acceptances, bars). Two lists are not paged: an RFQ’s quotes (quotes) and your exits to HyperCore (exits). Every other list 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.

Compatibility

Responses and WebSocket events gain fields, and enums gain values, as the API grows. Ignore fields you don’t know, and treat an unknown enum value as a state you can’t act on. Requests stay strict: an unknown request field is refused. Response schemas in this reference allow extra fields, so a client generated from them keeps working. The signed terms (entry, sell_back) and legs stay exact, since you sign them field for field. Breaking changes are listed in the SDK changelog.

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.

Response times

The API is served from Singapore. Most of a request’s time is the network trip between your client and Singapore, so a caller in Asia sees far shorter response times than one in the Americas or Europe. The first request on a new connection is slower than the ones after it.

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.