# Symbol depth stream

## Stream Description

Level-2 market depth from the trade server's order book.

> **Optional — off by default.** Market depth is only published for symbols the broker has enabled
> it for. **Subscribing always SUCCEEDS** — the subscription is accepted and then simply delivers
> nothing, because whether depth flows is a broker-side setting this API cannot see. Silence on
> `@depth` therefore means "not enabled", not "not subscribed": confirm with the broker rather than
> waiting on an error that will not come.

## Stream Name

`<SYMBOL>@depth`

## Response Example

```json
{"e":"depth","E":1789012345678,"s":"XAUUSD","T":1789012345670,"b":[["2331.15","2.50"],["2331.10","4.00"]],"a":[["2331.42","1.00"],["2331.48","3.25"]]}
```

| Field | Type | Description |
| - | - | - |
| `e` | STRING | `"depth"` |
| `E` | LONG | Event time, Unix ms. |
| `s` | STRING | Symbol. |
| `T` | LONG | Book timestamp from the trade server, Unix ms. |
| `b` | ARRAY | Bid levels, each `[price, volumeLots]`. |
| `a` | ARRAY | Ask levels, each `[price, volumeLots]`. |

**Notes**

- Each message is a **complete snapshot** of the book, not a diff. There are no `U`/`u` update ids
  and there is nothing to reconstruct — replace your local book wholesale on every message.
- Level ordering is the trade server's. **Sort by price yourself** if you need ordered depth.
- Volumes are lots.
- Depth is informational. Orders are still filled by the broker at bid/ask under the symbol's
  execution mode; a visible level is not a guaranteed fill.
