updateIsolatedMargin payload - Isolated Margin Updates
Decode Hyperliquid `updateIsolatedMargin` payloads for isolated margin 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 updateIsolatedMargin payload records margin added to or removed from an isolated position.
Sample Data
{
"signature": {
"r": "0xd14b53f9f6b7cb39e5289f62c453f22d21d46def6f7acbc267cb33f1d2d2668f",
"s": "0x393d89fcd7835fad35ff2b06e29b6c56bd8034efc5bd9b38848c8ac7dd32fbc3",
"v": 28
},
"action": {
"type": "updateIsolatedMargin",
"asset": 0,
"isBuy": true,
"ntli": -1000000
},
"nonce": 1768146925098
}View this transaction on Hypurrscan
Field Reference
Action Fields
| Field | Type | Description |
|---|---|---|
type | string | Always "updateIsolatedMargin" |
asset | number | Asset index (e.g., 0 = BTC) |
isBuy | boolean | Position side: true for long, false for short |
ntli | number | Margin adjustment in raw units (negative = remove, positive = add) |
Understanding ntli
The ntli field represents the margin change in raw integer units:
- Positive values: Add margin to the position (reduce liquidation risk)
- Negative values: Remove margin from the position (increase liquidation risk)
The value -1000000 in the sample represents removing 1 USD of margin (assuming 6 decimal places for USDC).
Use Cases
Position Risk Monitoring
Track margin adjustments to understand how traders manage position risk:
def process_updateIsolatedMargin_action(action):
asset = action.get('asset')
side = 'LONG' if action.get('isBuy') else 'SHORT'
margin_change = action.get('ntli') / 1_000_000 # Convert to USD
direction = 'added' if margin_change > 0 else 'removed'
print(f"Margin {direction}: {abs(margin_change)} USD on {side} {asset}")Liquidation Prevention Analysis
Monitor margin additions that may indicate positions approaching liquidation.
Capital Efficiency Tracking
Track margin removals to understand how traders optimize capital usage.
Related Action Payloads
- updateLeverage - Leverage-setting changes
- userPortfolioMargin - Portfolio margin mode