First order in under 60 seconds.
Every action runs through one endpoint, https://send.hyperliquidapi.com/exchange, in three steps. Readable JSON in, no SDK, no dependencies. Any HTTP client and any EIP‑712 signer works, and your key signs locally so it never reaches the API.
1 · Build
POST your order as plain JSON, no signature. Get back a hash to sign.
POST /exchange {"action":{"type":"order", "orders":[{"asset":"BTC", "side":"buy","size":"0.001", "tif":"ioc"}]}} → {"hash":"0x9f2c…","nonce":1719…}
2 · Sign (local)
Sign the hash with your key. It never leaves your machine.
// any EIP-712 signer, // your side sig = sign(privateKey, hash)
3 · Send
POST it back with the signature. It executes.
POST /exchange {"action":{…}, "nonce":1719…, "signature":{…}} → {"success":true, "exchangeResponse":{…}}
Verify it worked
Approval status confirms you can trade; open orders confirms what's resting. Both are unsigned reads — safe to run any time.
curl -s "https://send.hyperliquidapi.com/approval?user=0xYOUR_ADDRESS"
# → { "approved": true, "maxFeeRate": "1%", "canTradePerps": true, … }Building with an agent?
The entire API is documented in a single machine-readable file. Point Claude, Codex, or any coding agent at it and it can build a working integration without scraping these pages.
Read https://hyperliquidapi.com/llms-full.txt and use it to place a market order for 0.5 HYPE via the build-sign-send flow.
The REST surface
Everything routes through https://send.hyperliquidapi.com. Order priority is set with priorityFee, which the API encodes as {"grouping":{"p":10000}} before hashing. Hyperliquid reads p as p / 100000000 of filled notional; 10000 is 1 bp and 80000 is the max. Priority fees require IOC orders on non-outcome assets and are paid from undelegated staking HYPE. HIP-4 # markets settle in USDC and do not support priority fees.
Exchange: Build (no signature)
POST /exchange without a signature. Accepts human-readable or wire format, injects the builder fee, applies optional priorityFee where supported, and returns the exact action + hash to sign.
| Method | Endpoint | Returns |
|---|---|---|
| POST | Build Order /exchange | { hash, nonce, action, isSpot, builderFee, builder, priorityFee? } |
| POST | Build Market Order /exchange | { hash, nonce, action (with computed price), isSpot, builderFee, builder, appliedSlippage, priorityFee? } |
| POST | Build Close Position /exchange | { hash, nonce, action, appliedSlippage, closePositionContext, priorityFee? } |
| POST | Build Cancel /exchange | { hash, nonce, action, summary, assets } |
| POST | Build Modify /exchange | { hash, nonce, action, summary, assets } |
| POST | Build Approval /exchange | { hash, nonce, details: { builder, maxFeeRate, chain }, typedData } |
| POST | Build Revoke /exchange | { hash, nonce, details: { builder, maxFeeRate: "0%", chain }, typedData } |
| POST | Build Outcome Action /exchange | { hash, nonce, action, actionType, nextStep } |
| POST | Build Priority Funding Deposit /exchange | { hash, nonce, action, actionType, typedData, nextStep } |
| POST | Build User-Signed Action /exchange | { hash, nonce, action, actionType, typedData, nextStep } |
| POST | Build Leverage or Margin Action /exchange | { hash, nonce, action, actionType, nextStep } |
Exchange: Send (with signature)
POST /exchange with the action from a build response plus its nonce and signature. Verifies approval and priority rules, then forwards to Hyperliquid.
| Method | Endpoint | Returns |
|---|---|---|
| POST | Send Order /exchange | { success, user, exchangeResponse, orders? } |
| POST | Send Cancel /exchange | { success, user, exchangeResponse } |
| POST | Send Modify /exchange | { success, user, exchangeResponse } |
| POST | Send Approval /exchange | { approved, builder, maxFeeRate, user, message, exchangeResponse } |
| POST | Send Revoke /exchange | { revoked, builder, user, message, exchangeResponse } |
| POST | Send Outcome Action /exchange | { success, user, exchangeResponse } |
| POST | Send User-Signed Action /exchange | { success, user, exchangeResponse } |
| POST | Send Leverage or Margin Action /exchange | { success, user, exchangeResponse } |
Enhanced Endpoints
Read-only GET/POST helpers that enrich Hyperliquid data: approval status, open orders, order status, preflight, markets, outcomes, and dexes.
| Method | Endpoint | Returns |
|---|---|---|
| GET | Check Approval /approval?user=0x… | { approved, maxFeeRate, maxFeeRaw, canTradePerps, canTradeSpot, feeBreakdown } |
| POST | Open Orders /openOrders | { orders, count, cancelActions: { all, byAsset } } |
| POST | Order Status /orderStatus | { status, explanation, coin, asset, name, isSpot, order, statusTimestamp } |
| POST | Preflight /preflight | { valid, errors, assetInfo, estimatedFee, priorityFee?, isSpot } |
| GET | List Markets /markets | { perps, spot, hip3, hip4 } |
| GET | List Outcomes /outcomes | { quoteToken, outcomes, questions, encoding, actions } |
| GET | Outcome Balances /outcomes/balances?user=0x…&outcome=10 | { user, outcome, quote, yes, no, actions } |
| GET | List Dexes /dexes | [{ name, index }, …] |
Order action — body fields
action.orders[].assetstringasset name, e.g. "BTC", "HYPE", "xyz:SILVER", or "#10" (HIP-4)action.orders[].sidestring"buy" or "sell"action.orders[].pricestringlimit price (omit for market orders)action.orders[].sizestringorder sizeaction.orders[].tifstring"ioc", "gtc", "alo", or "market"priorityFeenumber|string?optional IOC-only priority rate p, max 80000; p=10000 is 1 bp. Encoded as action.grouping {"p": priorityFee} before signingvaultAddressstring?optional vaultslippagenumber?market-order slippage tolerance (default 3%). Range: 0.1%–10%Examples
curl -s -X POST https://send.hyperliquidapi.com/exchange \
-H "Content-Type: application/json" \
-d '{
"action": {
"type": "order",
"orders": [{"asset": "BTC", "side": "buy", "price": "100000",
"size": "0.001", "tif": "ioc"}]
}
}'Error codes
Every error uses the appropriate HTTP status code and includes error, message, and guidance with exactly what to do next.
| HTTP | Error code | Meaning | What to do |
|---|---|---|---|
| 403 | NOT_APPROVED | Not approved / fee too low | Run approval flow or visit /approve |
| 422 | BUILDER_MISMATCH | Builder mismatch | POST /exchange without a signature; it injects the correct builder |
| 422 | SIGNATURE_INVALID | Invalid signature | Sign the exact hash from the build response. r/s: 0x hex, v: 27 or 28 |
| 422 | HL_EXCHANGE_* | Exchange rejection | See errorCode and actionRequired in response |
| 400 | INVALID_JSON | Invalid request body | Send valid JSON to the correct endpoint |
| 422 | INVALID_PARAMS | Invalid params | Check required fields and types |
| 500 | INTERNAL_ERROR | Internal error | Retry in a few seconds |
Two fees per trade
The API itself is free: no subscription, no API key, no usage tiers. You pay only when an order fills, and only two fees exist. 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
| Market | Fee | Protocol max |
|---|---|---|
| Perpetuals | 0.04% | 0.1% |
| Spot | 0.05% | 1% |
Exchange fee
charged by Hyperliquid, based on your volume tier
| Market | Taker | Maker |
|---|---|---|
| Perpetuals | 0.045% | 0.015% |
| Spot | 0.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, and you can revoke at any time. Priority is optional: set priorityFee on an IOC order (max 80000), paid from undelegated staking HYPE. HIP-4 # markets do not support priority fees.
Questions
Hyperliquid API is a zero-custody REST builder API for Hyperliquid, built by Quicknode. It lets you trade perpetuals, spot, HIP-3, and HIP-4 markets programmatically while your private keys never leave your machine.