> ## Documentation Index
> Fetch the complete documentation index at: https://xoxno.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# networkStats

> Full MultiversX network snapshot with TPS, blocks, mempool, validators, and health metrics.

The server pushes this event at adaptive intervals tuned to block time. On `/ws/stats`, it arrives automatically. On `/ws`, subscribe to the `networkStats` topic. The payload includes schema versioning for forward compatibility.

## Topic

Connect to `wss://relayer.xoxno.com/ws/stats` (automatic) or subscribe to `networkStats` on `wss://relayer.xoxno.com/ws`.

## Event fields

<ResponseField name="type" type="string">
  Value is `"networkStats"`.
</ResponseField>

<ResponseField name="schemaVersion" type="string">
  Semantic version of the schema (e.g., `"1.1.0"`).
</ResponseField>

<ResponseField name="sequence" type="integer">
  Monotonically increasing frame counter. Use this to detect gaps.
</ResponseField>

<ResponseField name="ts" type="integer">
  Unix timestamp in milliseconds.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties" defaultOpen>
    <ResponseField name="network" type="object">
      <Expandable title="properties">
        <ResponseField name="currentTps" type="number">Current transactions per second.</ResponseField>
        <ResponseField name="avgTps10s" type="number">Rolling 10-second TPS average.</ResponseField>
        <ResponseField name="connectedPeers" type="integer">Total connected P2P peers.</ResponseField>
        <ResponseField name="activeValidators" type="integer">Validators with a recent heartbeat.</ResponseField>
        <ResponseField name="wsLagMs" type="integer">WebSocket delivery lag, in milliseconds.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="blocks" type="object">
      <Expandable title="properties">
        <ResponseField name="latestShard" type="object">Latest shard block metadata (nonce, round, epoch, hash).</ResponseField>
        <ResponseField name="latestMeta" type="object">Latest metachain block metadata.</ResponseField>
        <ResponseField name="blockTimeMsP50ByShard" type="object">Median block time per shard in milliseconds.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="mempool" type="object">
      <Expandable title="properties">
        <ResponseField name="estimatedQueue" type="integer">Estimated pending transaction count.</ResponseField>
        <ResponseField name="ingressTps" type="number">Transactions entering the mempool per second.</ResponseField>
        <ResponseField name="inclusionTps" type="number">Transactions included in blocks per second.</ResponseField>
        <ResponseField name="pressure" type="number">Queue depth relative to throughput capacity (0.0 to 1.0).</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="validators" type="object">
      <Expandable title="properties">
        <ResponseField name="onlineByShard" type="object">Online validator count per shard.</ResponseField>
        <ResponseField name="totalOnline" type="integer">Total online validators.</ResponseField>
        <ResponseField name="heartbeatRatePerSec" type="number">Heartbeat messages per second.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="health" type="object">
      <Expandable title="properties">
        <ResponseField name="p2pDedupRatio1m" type="number">P2P message deduplication ratio over the last minute.</ResponseField>
        <ResponseField name="streamSubscribers" type="integer">Active WebSocket subscribers.</ResponseField>
        <ResponseField name="dataCompleteness" type="number">Data completeness score (0.0 to 1.0).</ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json networkStats event theme={"system"}
  {
    "type": "networkStats",
    "schemaVersion": "1.1.0",
    "sequence": 4821,
    "ts": 1738800000000,
    "data": {
      "network": {
        "currentTps": 85.3,
        "avgTps10s": 82.1,
        "connectedPeers": 147,
        "activeValidators": 3200,
        "wsLagMs": 2
      },
      "blocks": {
        "latestShard": { "nonce": 19284712, "round": 19285000, "epoch": 1200 },
        "latestMeta": { "nonce": 19284700, "round": 19284950, "epoch": 1200 },
        "blockTimeMsP50ByShard": { "0": 6000, "1": 6100, "2": 5900 }
      },
      "mempool": {
        "estimatedQueue": 1240,
        "ingressTps": 90.5,
        "inclusionTps": 85.3,
        "pressure": 0.34
      },
      "validators": {
        "onlineByShard": { "0": 800, "1": 800, "2": 800, "meta": 800 },
        "totalOnline": 3200,
        "heartbeatRatePerSec": 12.5
      },
      "health": {
        "p2pDedupRatio1m": 0.92,
        "streamSubscribers": 45,
        "dataCompleteness": 1.0
      }
    }
  }
  ```
</ResponseExample>
