updateLeverage payload - Leverage Updates
Decode Hyperliquid `updateLeverage` payloads for leverage updates, returned through Dwellir's read-only L1 gRPC API.
Read-only action reference
Dwellir's Hyperliquid gRPC API returns this decoded action payload through
StreamBlocks and
GetBlock. It does not submit or execute this action.
Submit supported user write actions through Hyperliquid's native
POST /exchange
endpoint.
The decoded updateLeverage payload records a leverage-setting change for a specific asset position.
Sample Data
{
"signature": {
"r": "0x10b0a002706afea1c9e337ac501fd52a96fb8ddad544b2b6a3a663e0c2e16e51",
"s": "0x5906914d9c472e585e13b52e9435fb1d9980022d625559b566a3541c0f92d5a2",
"v": 28
},
"action": {
"type": "updateLeverage",
"asset": 110000,
"isCross": false,
"leverage": 7
},
"nonce": 1768146912541
}View this transaction on Hypurrscan
Field Reference
Action Fields
| Field | Type | Description |
|---|---|---|
type | string | Always "updateLeverage" |
asset | number | Asset index to update leverage for |
isCross | boolean | true for cross margin, false for isolated margin |
leverage | number | New leverage value (e.g., 2 for 2x leverage) |
Margin Modes
Cross Margin (isCross: true)
- Shares margin across all positions
- Unrealized PnL from other positions can prevent liquidation
- More capital efficient but higher risk of cascade liquidations
Isolated Margin (isCross: false)
- Each position has dedicated margin
- Losses are limited to the position's margin
- Requires more capital but limits downside exposure
Use Cases
Risk Management Monitoring
Track leverage changes to understand trader risk appetite:
def process_updateLeverage_action(action):
asset = action.get('asset')
leverage = action.get('leverage')
margin_mode = 'cross' if action.get('isCross') else 'isolated'
print(f"Leverage update: asset {asset} -> {leverage}x ({margin_mode})")Liquidation Risk Analysis
Monitor leverage increases that may indicate higher liquidation risk.
Market Sentiment
Aggregate leverage changes can indicate market sentiment:
- Increasing leverage = More aggressive/bullish positioning
- Decreasing leverage = More conservative/risk-off
Related Action Payloads
- updateIsolatedMargin - Isolated margin adjustments
- userPortfolioMargin - Portfolio margin configuration
- order - Trading orders affected by leverage settings