Trading API
The error shape, what each status code means and the API's limits.
Last updated
Error shape
Errors from the API itself share one shape:
{ "error": { "code": "unknown_asset", "message": "unknown coin \"NOPE\"" } }Branch on code, which is stable. message is for people and may change. Every response, errors included, carries an x-request-id header; include it when you report a problem.
When Hyperliquid itself rejects a request, the response has the usual trading shape instead, with "status": "rejected" and Hyperliquid's reason in response.error.
Status codes
Status |
| Meaning | What to do |
|---|---|---|---|
200 | Submitted. Individual items may still have failed. | Check every entry in | |
400 |
| Malformed request, or not possible (such as closing a position you don't have, a price off the tick, an unknown | Fix the request |
400 |
| No market by that name | Check the |
401 |
| API key missing, invalid or revoked | Check the header and the key |
403 |
| Account disabled | Contact us |
404 |
| No such resource on your account | Check the id |
410 |
| A prepared action was submitted after its signing window | Prepare it again |
412 |
| Account not onboarded: the trading agent or the builder fee is not approved yet | Finish onboarding |
422 |
| Hyperliquid rejected the whole request | Read |
429 |
| Over your request rate | Wait for |
502 |
| The call to Hyperliquid failed; the action may or may not have executed | Check the order's status before retrying |
504 | The request took too long | Check the order's status before retrying |
A 502 or 504 on a trading request is ambiguous: see Handling a 502.
Common exchange rejections
Message | Cause |
|---|---|
| The master account has never deposited on Hyperliquid |
| The trading agent isn't approved, or was revoked on Hyperliquid |
| The order is worth under $10, including a small partial close |
| Not enough collateral for the order at your leverage |
A price off the tick (Hyperliquid's Price must be divisible by tick size.) or a size off the lot never reaches Hyperliquid: the API answers 400 first, naming the order. See Placing orders.
Limits
Limit | Value |
|---|---|
Requests per second, per account | 10 by default, burst of the same; can be raised |
Orders, cancels or modifies per batch | 50 |
Request body | 256 KiB |
Time allowed for a call to Hyperliquid | 5 seconds |
Prices and sizes | Up to 8 decimals |
Hyperliquid's own per-address limits apply on top; check them with GET /v1/rate-limit. A revoked API key or a disabled account stops working within 30 seconds.