Skip to main content
Hyperliquid
POST/exchange

Request Headers

string
required
Must be application/json

Request Body

object
required
Signed action. Unknown keys are rejected.
number
required
Replay-protection nonce in Unix milliseconds. Resend the identical signed request for retries.
object
required
Account owner or approved API wallet; use the exchange signing format.
string
Optional account-owner address. Rejects the request if the verified signer currently maps to another account. This unsigned check does not select an account or grant access.
number
Optional signed deadline in Unix milliseconds; requests after it are rejected

Response

Response Fields

string
"ok" when an update result is returned; "err" for a rejected numeric-asset request. Hexadecimal-asset requests report failures in response.data.status.
object | string
Object when status is "ok", or a rejection message when status is "err". An HTTP timeout or disconnect does not establish failure; HTTP 503 can also leave the outcome uncertain.
string
Numeric-asset requests return "default" when completed or "pending" when unresolved after waiting up to three seconds. Hexadecimal-asset requests return "updateLeverage". A pending target is not confirmed leverage.
string
Present for pending numeric-asset responses and every hexadecimal-asset result. Save this ID to track completion on User Transactions: match transaction.transactionId and read transaction.accountUpdateResponse. Retry the original signed request to recover its recorded result without submitting another update.
string
Hexadecimal-asset requests only: "completed", "pending", or "failed". Market Trading State reports confirmed and pending leverage separately.
string
Failure message for a "failed" hexadecimal-asset result.
string
Optional error code for a failed hexadecimal-asset result.
string
Optional structured reason for a failed hexadecimal-asset result.