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

# Streaming

> Two live streams exist, both plain Server-Sent Events.

Two live streams exist, both plain Server-Sent Events:

* `/api/market/stream` for live bars and quotes;
* `/api/account/stream` for orders, positions, and balances.

SSE means no websocket library, no custom protocol, and no handshake to debug. An `EventSource`
in a browser, a `for await` loop on a server, or `curl -N` on the command line is a complete
client.

## The snapshot law

Both streams replay a full snapshot on every connect and reconnect, then send incremental events.
This one rule makes client state trivial:

* on connect, replace your local state with the snapshot;
* after that, apply events as they arrive;
* if the connection drops, reconnect and replace again.

Treat anything absent from a snapshot as gone. A working order that filled while you were
disconnected is simply not in the next snapshot, and that absence is the truth. You never need to
reconcile a gap, replay a cursor, or ask what you missed. Reconnecting is always safe and always
sufficient.
