# allLeverageUpdates stream

> HyperCore private-preview documentation.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Callout intent="info">
  This API is in private preview. Target September 2026; timing is subject to change.
</Callout>


# allLeverageUpdates stream

Streams leverage, isolated-margin, and isolated-margin top-up updates across users.

## Subscribe

```json
{
  "method": "subscribe",
  "subscription": {
    "type": "allLeverageUpdates"
  }
}
```

## Event envelope

```json
{
  "type": "allLeverageUpdates",
  "channel": "allLeverageUpdates",
  "seq": 1,
  "cursor": 1704067200000,
  "updates": [{
    "updateType": "updateLeverage",
    "time": 1704067200000,
    "user": "0x1111111111111111111111111111111111111111",
    "coin": "ETH",
    "isCross": true,
    "leverage": 10,
    "txIndex": 0
  }]
}
```

The stream also emits `updateIsolatedMargin` records with isBuy and ntli, and `topUpIsolatedOnlyMargin` records with targetLeverage.

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

## Payload fields

| Field | Type | Description |
| --- | --- | --- |
| type | string | Event type. |
| channel | string | Routing channel for the event. |
| seq | integer | Monotonic sequence number for the stream. |
| cursor | integer | Resume cursor for the event position. |
| updates | array | Leverage-setting update records. |
| updates[] | object | Leverage, isolated-margin, or isolated-margin top-up record. |
| updates[].updateType | string | Update discriminator: `updateLeverage`, `updateIsolatedMargin`, or `topUpIsolatedOnlyMargin`. |
| updates[].time | integer | Event time in milliseconds. |
| updates[].user | string | Address whose setting changed. |
| updates[].coin | string | Market identifier. |
| updates[].isCross | boolean | Whether a leverage update uses cross margin. |
| updates[].leverage | integer | Leverage setting for a leverage update. |
| updates[].isBuy | boolean | Isolated-margin side for an `updateIsolatedMargin` update. |
| updates[].ntli | string | Isolated-margin notional value for an `updateIsolatedMargin` update. |
| updates[].targetLeverage | string | Target leverage for a `topUpIsolatedOnlyMargin` update. |
| updates[].txIndex | integer | Index of the transaction within its block. |

## Behavior

The stream batches update records. The cursor identifies the event position for resumption.

## Unsubscribe

```json
{
  "method": "unsubscribe",
  "subscription": {
    "type": "allLeverageUpdates"
  }
}
```

## Resume

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