Skip to main content
Two live streams push changes to you as they happen, both as plain Server-Sent Events. Use this page when you build anything that shows live prices or a live account. Server-Sent Events need no websocket library, custom protocol or handshake. An EventSource in a browser, a for await loop on a server, or curl -N on the command line is a complete client.

Rebuild from the snapshot

Both streams send a full snapshot every time you connect or reconnect, then send changes as they happen. That one rule keeps your client simple:
  1. When you connect, replace your local state with the snapshot.
  2. After that, apply each event as it arrives.
  3. If the connection drops, reconnect and replace your state again.
Treat anything missing from a snapshot as gone. A working order that filled while you were disconnected simply isn’t in the next snapshot, and that absence is the truth. You never reconcile a gap, replay a cursor or ask what you missed, so reconnecting is always safe and always enough.