> ## 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.

# WebSocket Errors

> Every error code specific to WebSocket connections, and how to fix it.

A rejected WebSocket handshake gets a normal HTTP status and a JSON error body, then the connection closes. It's the same envelope a failed REST call uses:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "SYMBOL_LIMIT_REACHED",
    "message": "Your free plan allows 10 simultaneous symbol subscriptions. You requested 11.",
    "limit": 10,
    "requested": 11,
    "plan": "free"
  }
}
```

## Codes shared with REST

`MISSING_API_KEY`, `INVALID_API_KEY`, `IP_NOT_ALLOWED`, and `PLAN_REQUIRED` mean the same thing at a WebSocket handshake as they do on a REST request. See [Errors](/errors) for what causes each one and how to fix it.

## Codes specific to WebSocket

| Error code             | Status | Cause                                                          |
| :--------------------- | :----: | :------------------------------------------------------------- |
| `SYMBOLS_REQUIRED`     |   400  | Connected to `/v1/ws/prices` without a `symbols` parameter     |
| `SYMBOL_NOT_FOUND`     |   404  | One or more requested symbols don't exist                      |
| `SYMBOL_LIMIT_REACHED` |   429  | Requested more symbols than your plan allows on one connection |
| `TOO_MANY_CONNECTIONS` |   429  | Already at your plan's concurrent connection limit             |

<AccordionGroup>
  <Accordion title="SYMBOLS_REQUIRED (400)">
    You connected to `/v1/ws/prices` without a `symbols` parameter. It's the one channel that needs it, since a live feed of every NGX-listed company at once isn't useful to most integrations.

    Add a comma-separated list of tickers to the connection URL:

    ```
    wss://api.ngnmarket.com/v1/ws/prices?api_key=ngm_live_YOUR_KEY&symbols=DANGCEM,GTCO
    ```
  </Accordion>

  <Accordion title="SYMBOL_NOT_FOUND (404)">
    One or more symbols in your `symbols` list don't exist. The response lists which ones in `invalid`:

    ```json theme={null}
    {
      "success": false,
      "error": {
        "code": "SYMBOL_NOT_FOUND",
        "message": "The following symbols were not found: DANGCEME",
        "invalid": ["DANGCEME"]
      }
    }
    ```

    Check for typos, or confirm the ticker against [`GET /companies`](/api-reference/companies/list) or [`GET /companies/identifiers`](/api-reference/companies/identifiers).
  </Accordion>

  <Accordion title="SYMBOL_LIMIT_REACHED (429)">
    You asked for more symbols on one connection than your plan allows. See [Limits](/websocket/limits) for the table.

    Request fewer symbols, split your watchlist across more than one connection if your plan's connection limit allows it, or upgrade your plan.
  </Accordion>

  <Accordion title="TOO_MANY_CONNECTIONS (429)">
    Your account already has as many WebSocket connections open as your plan allows, counted across all six channels combined. See [Limits](/websocket/limits).

    Close an existing connection before opening a new one, or upgrade your plan for a higher connection limit.
  </Accordion>
</AccordionGroup>

<CardGroup cols={2}>
  <Card title="Limits" icon="gauge-high" href="/websocket/limits">
    Connection and symbol limits by plan
  </Card>

  <Card title="REST errors" icon="circle-exclamation" href="/errors">
    Every error code shared with REST requests
  </Card>
</CardGroup>
