Skip to content
Alchemy Logo

userIsolatedMarginUpdates stream

This API is in private preview. Target September 2026; timing is subject to change.

Streams isolated-margin and isolated-margin top-up updates for the requested addresses.

{
  "method": "subscribe",
  "subscription": {
    "type": "userIsolatedMarginUpdates",
    "addresses": ["0x1111111111111111111111111111111111111111"]
  }
}

{
  "type": "userIsolatedMarginUpdates",
  "channel": "userIsolatedMarginUpdates",
  "seq": 1,
  "cursor": 1704067201000,
  "updates": [{
    "updateType": "updateIsolatedMargin",
    "time": 1704067201000,
    "user": "0x1111111111111111111111111111111111111111",
    "coin": "BTC",
    "isBuy": true,
    "ntli": "500.00",
    "txIndex": 0
  }]
}

An isolated-margin top-up update uses updateType topUpIsolatedOnlyMargin and includes targetLeverage instead of isBuy and ntli.

These are normalized events derived from on-chain actions: asset IDs are resolved to market symbols and integer quantities are converted to decimal strings.

FieldTypeDescription
typestringEvent type.
channelstringRouting channel for the event.
seqintegerMonotonic sequence number for the stream.
cursorintegerResume cursor for the event position.
updatesarrayMargin update records.
updates[]objectIsolated-margin or isolated-margin top-up record.
updates[].updateTypestringUpdate discriminator: updateIsolatedMargin or topUpIsolatedOnlyMargin.
updates[].timeintegerEvent time in milliseconds.
updates[].userstringAddress whose margin setting changed.
updates[].coinstringMarket identifier.
updates[].isBuybooleanIsolated-margin side for an updateIsolatedMargin update.
updates[].ntlistringIsolated-margin notional value for an updateIsolatedMargin update.
updates[].targetLeveragestringTarget leverage for a topUpIsolatedOnlyMargin update.
updates[].txIndexintegerIndex of the transaction within its block.

The stream batches updates for the subscribed addresses. The cursor identifies the event position for resumption.

{
  "method": "unsubscribe",
  "subscription": {
    "type": "userIsolatedMarginUpdates",
    "addresses": ["0x1111111111111111111111111111111111111111"]
  }
}

To resume a stream, supply cursor in the subscription object. Store and return the cursor unmodified.

Was this page helpful?