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

# Market Snapshot

> Live updates over WebSocket for the daily NGX market summary.

```
wss://api.ngnmarket.com/v1/ws/snapshot
```

This pushes the current trading-day summary whenever it changes. It's the same object [`GET /market/snapshot`](/api-reference/market/snapshot) returns, including breadth, turnover rate, and year-to-date change. No query parameters, so every connection receives the same data.

```
wss://api.ngnmarket.com/v1/ws/snapshot?api_key=ngm_live_YOUR_KEY
```

<CodeGroup>
  ```javascript Browser theme={null}
  const ws = new WebSocket(
    'wss://api.ngnmarket.com/v1/ws/snapshot?api_key=ngm_live_YOUR_KEY'
  );

  ws.onmessage = (event) => {
    const msg = JSON.parse(event.data);
    console.log(msg.type, msg.snapshot);
  };
  ```

  ```javascript Node.js theme={null}
  import WebSocket from 'ws';

  const ws = new WebSocket(
    'wss://api.ngnmarket.com/v1/ws/snapshot?api_key=ngm_live_YOUR_KEY'
  );

  ws.on('message', (data) => {
    const msg = JSON.parse(data.toString());
    console.log(msg.type, msg.snapshot);
  });
  ```

  ```python Python theme={null}
  import asyncio
  import json
  import websockets

  async def main():
      url = "wss://api.ngnmarket.com/v1/ws/snapshot?api_key=ngm_live_YOUR_KEY"
      async with websockets.connect(url) as ws:
          async for raw in ws:
              msg = json.loads(raw)
              print(msg["type"], msg["snapshot"])

  asyncio.run(main())
  ```
</CodeGroup>

## Message format

`snapshot` arrives once on connect. `update` arrives whenever the trading-day summary changes. Both carry the same shape: a single object, not a list.

```json theme={null}
{
  "type": "update",
  "snapshot": {
    "date": "2026-08-21",
    "asi": 104250.30,
    "asi_change": 850.20,
    "asi_change_percent": 0.82,
    "ytd_asi_change_percent": 58.88,
    "deals": 6420,
    "volume": 412300000,
    "value_traded": 8930000000,
    "turnover_rate": 0.0359,
    "market_cap": {
      "equity": 61500000000000,
      "bonds": 21000000000000,
      "etfs": 180000000000,
      "total": 82680000000000
    },
    "breadth": {
      "advancers": 27,
      "decliners": 32,
      "unchanged": 85,
      "total": 144,
      "adv_dec_ratio": 0.84
    },
    "total_listed_securities": 151,
    "session": {
      "open_time": "10:00",
      "close_time": "14:30",
      "timezone": "Africa/Lagos"
    },
    "updated_at": "2026-08-21T11:40:00.000Z"
  }
}
```

See [Errors](/websocket/errors) for connection-level error codes. This channel takes no parameters, so nothing about it specifically can fail.
