Authorization: Bearer {token}GAME_ROOM_STREAM)LOTTO99915.?token= (URL-encoded).data: {"type":…,"data":…} only; handle them in onmessage and switch on .type.roomId opens a stream, which stays silent if the room does not exist.Authorization header or ?token=; resolve {gameCode}, {roomId} and the currency (query, else session).data: frame; round_settled carries only this player's playerResult.curl --location 'https://dev-api.ambfairgame.com/gapi/v1/gapi/v1/g/lotto/rooms/1/stream?token=tok_synthetic_7f3a9c¤cy=THB' \
--header 'Authorization: Bearer 3f9a1c7e5b2d4f6081a3c5e7f9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7' \
--header 'Accept-Language: th'data: line of the text/event-stream — The server opened a new betting round for this room + currency + demo/real: at start-up, at the moment the previous round closes, in the periodic recovery sweep, as a replacement after a cancelled round, or when recovering a stuck round.{
"type": "round_started",
"data": {
"roundID": "tbq1x0a7c3e91f2",
"endTime": "2026-09-30T18:45:30.123456789+07:00",
"seedHash": "9f2c1e7a5b3d8f40c6a1e2d9b7f35c08e4a6d1b9c2f7e3a05d8b6c4e1f2a9d37"
}
}