Live streams (SSE)

Subscribe to live tournament match, playday, and broadcast updates over Server-Sent Events.

Server-Sent Events (SSE) let browsers, scoreboards, and lightweight services react to live tournament changes without hosting a public webhook endpoint.

Stream endpoints

Strave exposes two SSE endpoints with the same event envelope:

  • Production: GET https://strave.gg/api/v2/events/{eventId}/stream (requires the event:read scope; adds broadcast and playday updates when the token also has broadcast:read).
  • Sandbox: GET https://strave.gg/api/v2/sandbox/events/{eventId}/stream (zero cost, emits simulated score ticks).

Event types

Each frame carries an id, an event name, and a JSON data envelope with id, type, eventId, occurredAt, revision, and data.

EventWhen Strave emits it
snapshotOnce on connect with the current event, matches, and playdays.
event.updatedThe event revision advanced.
match.updatedA match score, status, or schedule revision advanced.
broadcast.updatedBroadcast identity or overlay metadata changed.
playday.updatedLive playday state or overlay score changed.
reconnectSent before a serverless connection window ends so you resume.

Consume a stream with @strave/sdk

Both SDK flavours parse SSE frames and send Last-Event-ID automatically when reconnecting after a reconnect frame.

import { createStraveClient } from "@strave/sdk";

const strave = createStraveClient({ sandbox: true });

for await (const frame of strave.events.stream("event_sbx_eml_s7", {
	maxReconnects: 5,
})) {
	console.log(frame.type, frame.revision);
}

With Effect v4 (@strave/sdk/effect), consume the stream as a Stream:

import { Effect, Stream } from "effect";
import { StraveClient } from "@strave/sdk/effect";

const watch = Effect.gen(function* () {
	const strave = yield* StraveClient;
	yield* strave
		.streamEvent("event_sbx_eml_s7")
		.pipe(Stream.runForEach((frame) => Effect.logInfo(frame.type)));
}).pipe(Effect.provide(StraveClient.layer({ sandbox: true })));

Watch from your terminal

You can stream live updates straight to your terminal with the Strave CLI:

bunx @strave/cli matches watch event_sbx_eml_s7 --sandbox

Next steps