Skip to main content
Subscribe to gasStats to receive per-shard gas price and PPU statistics.

Request

{
  "action": "subscribe",
  "requestId": "gas-001",
  "topic": "gasStats"
}

Acknowledgment

{
  "action": "subscribe",
  "requestId": "gas-001",
  "status": "ok",
  "topic": "gasStats"
}

Pushed Event

{
  "type": "gasStats",
  "data": {
    "shard": 0,
    "gasPrice": {
      "min": 1000000000,
      "max": 1500000000,
      "avg": 1200000000,
      "bucketAvg": 1210000000,
      "percentiles": {
        "p50": 1150000000,
        "p75": 1350000000,
        "p90": 1450000000
      }
    },
    "ppu": {
      "avg": 0.0000012,
      "percentiles": {
        "p50": 0.0000011,
        "p75": 0.0000013,
        "p90": 0.0000014
      }
    }
  }
}

Fields

FieldMeaning
data.shardShard ID.
gasPrice.avgArithmetic average across the 30-minute window.
gasPrice.bucketAvgAverage of 10-second bucket averages.
gasPrice.percentilesp50, p75, and p90 gas prices.
ppuPrice per gas unit after data payload costs.

Limits

LimitValue
Update cadence50 ms debounce on state changes
Periodic fallback5 s
Window30 minutes, divided into 10-second buckets
Topic slot usage1 of 64 active topics

Unsubscribe

{
  "action": "unsubscribe",
  "requestId": "gas-stop",
  "topic": "gasStats"
}

Reconnect Handling

After reconnect, send the subscribe control message again. Keep the last received shard values in memory until fresh events arrive.