Trading API
Positions, open orders, fills, order status, prices, market metadata and the order book.
Last updated
Read endpoints return Hyperliquid's own JSON, passed through unchanged, so Hyperliquid's documentation of each response applies as is. Account reads are always for your account's master address.
Endpoints marked dex cover the main perpetuals by default; add ?dex=xyz for a HIP-3 dex.
Your account
Endpoint | Returns | Hyperliquid request |
|---|---|---|
| Positions, margin summary and account value |
|
| Spot token balances |
|
| Open orders, including trigger orders |
|
| Your most recent fills |
|
| One order's status, by |
|
| Your Hyperliquid request allowance |
|
curl -s https://hl-api-production-65c8.up.railway.app/v1/positions -H "Authorization: Bearer $API_KEY"Fills
Without parameters, GET /v1/fills returns your most recent fills. For a time range, pass start_time and optionally end_time, in unix milliseconds:
curl -s "https://hl-api-production-65c8.up.railway.app/v1/fills?start_time=1790400000000&end_time=1790486400000" \
-H "Authorization: Bearer $API_KEY"Hyperliquid caps how many fills one response holds. To walk a long history, request consecutive time windows.
Order status
GET /v1/orders/{id} takes Hyperliquid's oid or your cloid:
curl -s https://hl-api-production-65c8.up.railway.app/v1/orders/7f1c1d2e-4b5a-4c3d-9e8f-0a1b2c3d4e5f \
-H "Authorization: Bearer $API_KEY"It reports the order's current state (open, filled, cancelled, triggered and so on), or unknownOid when Hyperliquid doesn't know the id. This is the call to make after an ambiguous 502, but an order placed a moment ago can still read unknownOid while it is live: look again after a second before treating it as not placed (see Placing orders).
Market data
Endpoint | Returns | Hyperliquid request |
|---|---|---|
| Mid price of every market |
|
| Market metadata (size decimals, max leverage) and live context (mark price, funding, open interest) |
|
| Order book, best levels on each side |
|
curl -s https://hl-api-production-65c8.up.railway.app/v1/market/book/ETH -H "Authorization: Bearer $API_KEY"Market metadata changes rarely. Cache it and refresh every few minutes rather than fetching it before each order.
Anything else
POST /v1/info forwards any Hyperliquid info request, for data the endpoints above don't cover. Send the request body exactly as Hyperliquid documents it:
curl -s -X POST https://hl-api-production-65c8.up.railway.app/v1/info \
-H "Authorization: Bearer $API_KEY" \
-H 'content-type: application/json' \
-d '{ "type": "spotMeta" }'Account settings
Endpoint | Returns |
|---|---|
| Your account: master address, signing mode, rate limit and current builder fee |
| Onboarding checklist, read live from Hyperliquid |
| Your trading agent and account mode |
| The builder fee, and whether your approval covers it |
| Your recent actions and their results, newest first |
GET /v1/actions is a log of every action the API sent for you, with the request, the exchange's response and the latency. Page through it with limit (1 to 500, default 50) and before, set to the previous page's next_before.