This endpoint requires signature authentication. See our comprehensive Authentication via Signatures guide for implementation details.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
Required parameters
-
action
(object, required) — The update leverage action object containing:type
(string) — Must be"updateLeverage"
asset
(number) — Asset index of the coinisCross
(boolean) —true
for cross leverage,false
for isolated leverageleverage
(number) — New leverage value (must be within allowed range for the asset)
-
nonce
(number, required) — Current timestamp in milliseconds (must be recent) -
signature
(object, required) — EIP-712 signature of the action
Optional parameters
vaultAddress
(string, optional) — Address when trading on behalf of a vault or subaccountexpiresAfter
(number, optional) — Timestamp in milliseconds after which the request is rejected
Leverage constraints
Each asset has specific leverage constraints:- Minimum leverage — Usually 1x
- Maximum leverage — Varies by asset (3x to 40x depending on liquidity and volatility)
- Cross margin — Shares margin across all positions
- Isolated margin — Margin isolated to specific position
Returns
Returns an object with update status:status
—"ok"
if successfulresponse
— Contains update details:type
—"default"
Example request
Response example
Important considerations
- Existing positions — Leverage changes affect margin requirements for existing positions
- Liquidation risk — Increasing leverage increases liquidation risk
- Available margin — Ensure sufficient margin before increasing leverage
- Asset limits — Each asset has different maximum leverage limits
Use cases
- Risk adjustment — Dynamically adjust risk based on market conditions
- Capital efficiency — Optimize margin usage across positions
- Strategy implementation — Set appropriate leverage for different trading strategies
- Position management — Adjust leverage before opening new positions
Leverage is only checked when opening a position. After opening, monitor your positions to avoid liquidation as leverage effectively changes with unrealized PnL.
Increasing leverage on existing positions increases liquidation risk. Always ensure you have sufficient margin to support the new leverage level.
Body
application/json