For the complete documentation index, see llms.txt. This page is also available as Markdown.

Prepare a leverage update

Prepare a leverage update

post

Build an unsigned leverage and margin-mode change for one asset.

Same prepare → sign → execute flow as /api/v1/perp/order: sign the returned eip712 payload and submit it to /api/v1/perp/execute. This call changes nothing on its own.

Leverage is set per asset rather than per account, and applies to positions opened afterwards — it does not re-margin a position you already hold. The maximum differs by asset, so read max_leverage from /api/v1/perp/meta first; a value above it is rejected by the exchange. is_cross chooses cross margin (the account's whole margin backs the position) or isolated margin (only the margin committed to that position does).

Authorizations
apikeystringRequired

API key for authentication

Body

Prepare a leverage/margin-mode update.

wallet_addressstringRequired

Wallet address on Hyperliquid

Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
coinstringRequired

Asset symbol

Example: BTC
leverageinteger · min: 1 · max: 200Required

Leverage multiplier. The accepted maximum is per asset — read max_leverage from /api/v1/perp/meta, since a higher value is rejected by the exchange even when it passes this range check.

Example: 5
is_crossbooleanOptional

True for cross margin (the account's whole margin backs the position), false for isolated margin (only the margin committed to that position)

Default: trueExample: true
Responses
200

Successful Response

application/json
post/api/v1/perp/leverage

Last updated

Was this helpful?