Assetera Docs
API reference

Real-time (SSE)

The planned real-time subscription service. Integrators subscribe over Server-Sent Events (SSE) to live updates such as order and trade updates and notifications. Planned.

Assetera plans a dedicated real-time service. Integrators subscribe over Server-Sent Events (SSE) to live updates (for example order and trade updates, price ticks, and per-user notifications). The server pushes events; you do not poll.

Planned; WIP

This service is planned. Topic names, event types, and payload shapes are not yet published. The code and payload below are illustrative only: do not build against them yet. The direction (SSE with a broker backplane) follows the platform's real-time eventing decision (ADR-0005: SSE plus a Redis-backed fan-out so an event raised on one instance reaches clients on another).

How it works

Auth is the same bearer token used elsewhere: the stream is authorized against Assetera Identity, and per-user topics are scoped to the authenticated subject. Public topics (for example a token pair's order book) may stream without login.

Example: subscribe and read events

// Illustrative only: endpoint and topic shape are provisional.
const url = `https://api.<base_domain>/stream?topic=trades:tok_01H...`;
const es = new EventSource(url, { withCredentials: true });

es.addEventListener("trade", (e) => {
  const trade = JSON.parse(e.data);
  console.log("trade update", trade);
});

es.onerror = () => {
  // SSE auto-reconnects; resync from REST on reconnect.
};
{
  "type": "trade",
  "topic": "trades:tok_01H...",
  "data": {
    "id": "trd_01H...",
    "price": "100.00",
    "quantity": "5",
    "at": "2026-07-05T10:00:00Z"
  }
}

Snapshot then stream. On connect or reconnect, GET the current state over REST, then apply live deltas from the stream. A dropped event is never a correctness problem: reconcile against the REST API.

On this page