WebSocket Market Streams
Symbol depth stream
Stream Description
Level-2 market depth from the trade server's order book.
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/uupdate 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.


