Prepare a position close
API key for authentication
Prepare a market close for an existing position.
Wallet address on Hyperliquid
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045Asset symbol
BTCHow much of the position to close, in units of the asset. Pass the position's full size (from /api/v1/perp/positions) to close it completely.
0.01Current mark price, used only to derive the slippage-adjusted limit — the close is always an immediate-or-cancel reduce-only order
65000Side of the closing order, which is the opposite of the position: true closes a short (buy to close), false closes a long (sell to close)
Slippage tolerance as a fraction, not a percentage (0.03 = 3%)
0.03Example: 0.03Successful Response
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?