Last-Event-ID. You do not need a client library, and curl
works as a debugging tool.
Connect
topics is a comma-separated list and is the only required parameter.
Topics
Public, no session needed
Requires a session
These only work for the wallet you authenticated as. Requesting another wallet’s topics returns403.
Authenticate with a bearer token the same way as any other request:
The browser
EventSource API cannot send an Authorization header. In a browser,
rely on the session cookie, which is sent automatically. In Node or a bot, use
fetch with a streaming response and parse the frames yourself.Topic limits
Covering more than that means opening more connections. The limit exists because
each topic is a live subscription on the server, not a filter applied to a
firehose.
Event format
Every data frame arrives as event typeaura with a JSON body:
Heartbeats
Every 15 seconds the server sends an SSE comment:EventSource automatically. If you are parsing frames
yourself, skip lines starting with :. Their purpose is to keep proxies from
timing out an idle connection, and they double as a liveness signal: no heartbeat
for over 30 seconds means the connection is dead even if the socket looks open.
Reconnecting without gaps
This is the part worth getting right. Every event carries anid, and passing the
last one you processed replays what you missed.
?lastEventId=84213 if setting headers is awkward.
Browsers handle this natively. EventSource remembers the last id it saw and
sends it on reconnect with no code from you, which is a large part of why SSE is
worth the tradeoff here.
When replay is not possible
Replay works within a retention window. If you were disconnected longer than that, you get a reset frame instead of a gap:Recommended pattern
1
Snapshot first, then stream
Fetch the order book from REST, then open the stream. Buffer events that
arrive during the snapshot and apply them afterwards, discarding any whose
id predates the snapshot.2
Track the last id you applied
Persist it. On reconnect, send it as
Last-Event-ID.3
Handle aura-reset by resnapshotting
Go back to step one for that topic. Do not try to reason about what you
missed.
4
Watch the heartbeat
If more than 30 seconds pass with no frame of any kind, tear down and
reconnect rather than trusting the socket.
Errors
A mid-stream failure arrives as an
aura-error frame and the connection closes:
Connection limits
Stream connections are limited to 600 per minute per IP, which is sized for reconnect storms rather than steady state. A normal client holds one connection open indefinitely and never approaches it.Next
Integrator guide
Streaming versus polling, elevated rate limits, and bot patterns.
Place your first order
Get an order on-chain, then watch it fill on the stream.

