userLeverageUpdates
Stream live leverage updates for specific users.
Every live data message includes both routing identifiers with the same value:
{"type": "userLeverageUpdates", "channel": "userLeverageUpdates"}Other payload fields are omitted above. Existing clients may continue routing on either field.
Subscribe
{
"method": "subscribe",
"subscription": {
"type": "userLeverageUpdates",
"addresses": ["0x742d35Cc6634C0532925a3b844Bc9e7595f7F2e2"]
}
}Unsubscribe
{
"method": "unsubscribe",
"subscription": {
"type": "userLeverageUpdates",
"addresses": ["0x742d35Cc6634C0532925a3b844Bc9e7595f7F2e2"]
}
}Update data format
Updates are batched per block, sorted by tx_index. This stream includes all three update types: leverage changes, isolated margin updates, and top-up isolated margin updates — combined and interleaved in block order for the subscribed addresses.
Leverage update
Sent when a user changes their leverage setting (updateLeverage action).
Isolated margin update
Sent when a user adds or removes isolated margin on a position (updateIsolatedMargin action).
Top-up isolated margin update
Sent when a user adjusts their isolated margin to reach a target leverage (topUpIsolatedOnlyMargin action).
Field reference
Fields vary by update_type:
update_type
string
all
"leverage", "isolated_margin", or "top_up_isolated_margin"
time
number
all
Block timestamp (milliseconds since epoch)
user
string
all
User address (lowercase)
coin
string
all
Coin/market name (e.g. "ETH", "BTC")
tx_index
number
all
Transaction index within the block
is_cross
bool
leverage
Whether cross margin mode
leverage
number
leverage
New leverage value
is_buy
bool
isolated_margin
Side of the margin change
ntli
string
isolated_margin
Amount of margin added or removed
target_leverage
string
top_up_isolated_margin
Target leverage as float string
Examples
Common errors
Last updated