Prepare a perp order
API key for authentication
Order to prepare: market or limit, with an optional take-profit / stop-loss bracket.
Wallet address on Hyperliquid
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045Asset symbol (e.g. BTC, ETH)
BTCTrue opens a long, false opens a short
trueOrder size in units of the asset itself, not USD. Rounded to the asset's supported precision (sz_decimals from /api/v1/perp/meta); the response echoes the rounded value that is actually signed.
0.01For a limit order, the limit price. For a market order, the current mark price — it is adjusted by slippage to produce the immediate-or-cancel limit that is actually submitted.
65000limit rests on the book subject to tif; market submits an immediate-or-cancel order priced off price and slippage
limitExample: marketPossible values: When true the order can only shrink an existing position, never open or flip one
falseTime-in-force for limit orders (Gtc=good-til-cancel, Ioc=immediate-or-cancel, Alo=add-liquidity-only). Ignored for market orders, which are always immediate-or-cancel.
GtcExample: GtcPossible values: Slippage tolerance for market orders as a fraction, not a percentage (0.03 = 3%). Ignored for limit orders.
0.03Example: 0.03Optional take-profit trigger price, submitted as a reduce-only trigger order alongside the entry. Must be above price for a long and below it for a short.
70000Optional stop-loss trigger price, submitted as a reduce-only trigger order alongside the entry. Must be below price for a long and above it for a short.
60000Unsigned EIP-712 payload to sign and submit to /api/v1/perp/execute
Bad Request
Unauthorized
Forbidden
Not Found
Unprocessable Content
Too Many Requests
Internal Server Error
Bad Gateway
Service Unavailable
Gateway Timeout
Last updated
Was this helpful?