Lightning Baccarat results: every hand in ~5 seconds
How to receive every Lightning Baccarat round the moment it closes: the measured delay, the heads-up before the result, and code in Python and Node.
Published on October 30, 2026 · updated on October 31, 2026 · 8 min read
Receiving live Lightning Baccarat results is a different problem from querying history. In history, delay does not matter. Live, it is everything: if your message arrives 20 seconds after the hand, it arrives alongside the next hand, and whoever reads it no longer knows which round you are talking about.
This article covers the two ways the Lightning Baccarat API offers for following the table live, which one is faster, and how much time really passes between the hand closing and the data reaching your program. The stream itself — every event, the timestamps and the recovery errors — is covered in the reference article on real-time results; what follows are this table's numbers.
The real delay, measured in production
The right yardstick is not "the API is fast", it is how many seconds pass between the end of the round and the data being available. For Lightning Baccarat we measured that in production, comparing each round's settledAt with the moment it was stored: today it is about 5 seconds.
The interesting part is where that time sits. More than 90% of it happens before the round exists for us: it is the reader making sure which cards are on the table. The collector and the database add a few tenths of a second. That is why no client-side trick buys those seconds back — and why polling ten times a second is pointless: the data simply is not there any earlier.
And you do not have to take our word for it: every round that arrives over the stream carries the timestamps for each leg of the trip, so the number above is verifiable on your side, with your own clock.
# inside the "round" event
from datetime import datetime
t = lambda iso: datetime.fromisoformat(iso.replace("Z", "+00:00"))
table_to_us = (t(event["timing"]["receivedAt"]) - t(event["data"]["settledAt"])).total_seconds()
print(table_to_us, "s from the table to our API")A Lightning Baccarat round takes about 35 seconds. With a 5-second delay you have roughly 30 seconds of slack before the next hand, which is more than enough to format and publish a message.
Path 1: the stream, the fastest one
GET /v1/lightning-baccarat/stream is an HTTP connection that stays open. You open it once and the API pushes every round the moment it is stored, in Server-Sent Events format. There is no polling interval, so there is no polling delay.
In Python, with httpx:
stream.py
import json
import httpx
URL = "https://api.lynxmetrics.com/v1/lightning-baccarat/stream"
HEADERS = {"x-api-key": "YOUR_KEY", "accept": "text/event-stream"}
with httpx.stream("GET", URL, headers=HEADERS, timeout=None) as response:
response.raise_for_status()
event = None
for line in response.iter_lines():
if line.startswith("event:"):
event = line.split(":", 1)[1].strip()
elif line.startswith("data:") and event == "round":
body = json.loads(line.split(":", 1)[1])
hand = body["data"]
print(hand["outcome"], hand["data"]["player"]["cards"], hand["data"]["banker"]["cards"])In Node.js 18 or newer, with no dependencies:
stream.mjs
const response = await fetch("https://api.lynxmetrics.com/v1/lightning-baccarat/stream", {
headers: { "x-api-key": process.env.LYNX_KEY, accept: "text/event-stream" },
});
let buffer = "";
for await (const chunk of response.body) {
buffer += new TextDecoder().decode(chunk);
const blocks = buffer.split("\n\n");
buffer = blocks.pop() ?? "";
for (const block of blocks) {
const event = block.match(/^event: (.+)$/m)?.[1];
const payload = block.match(/^data: (.+)$/m)?.[1];
if (event === "round" && payload) {
const { data: hand } = JSON.parse(payload);
console.log(hand.outcome, hand.data.player.score, hand.data.banker.score);
}
}
}What arrives on the connection
| Event | When it arrives | What to do with it |
|---|---|---|
ready | Once, on open | The last settled hand, so you start in sync, and on a reconnect also what you missed, in missed. Not a new round |
phase | Optional (?phases=1), when the table starts resolving the hand | The roundId the hand will have, before the cards are read |
round | One per new hand | The round in data and the delivery timestamps in timing. The only event with an id: |
closed | Another connection opened with the same key | End of life for this process; reconnecting would drop the new connection |
line starting with : | Every 20 silent seconds | Heartbeat, so no proxy closes an idle connection. Ignore it |
Reconnecting without losing a hand
Open connections drop — network, deploys, and the 6-hour lifetime every connection has. Keep the id of the last hand you handled and send it back in the last-event-id header when you reopen: ready comes back with missed, the hands that closed while you were away, oldest first, up to 50.
headers = {"x-api-key": "YOUR_KEY", "accept": "text/event-stream"}
if last_id:
headers["last-event-id"] = last_idBeyond 50 missed hands — about half an hour of table time — the stream cannot settle it alone: you get resyncError: "too_many_missed" and finish syncing with `/results?after=`, which paginates. The connection opens in both cases; a reconnect never fails because of a stale cursor.
The heads-up that arrives before the result
The phase event is optional — open the connection with ?phases=1 to receive it — and fires when the table starts resolving the hand, the moment bets have closed and the cards have not been read yet. It carries the roundId that hand will have in its round, and it lets you tie whatever your program records to the right hand before the result comes out. To merely know which hand a result belongs to you do not need it: the round's id, the guaranteed order and last-event-id are enough.
It is not a promise of a result: a cut close-up or an unsafe read means the hand is discarded on purpose — better missing than guessed — and then no round arrives with that id. If you keep state per phase, you need to expire a phase that never became a hand.
What the stream costs against your limit
Opening the connection spends one request from your per-minute limit. The rounds that arrive afterwards spend nothing. So following along over the stream weighs far less than polling /latest every 3 seconds, which is 20 requests a minute. The Pro plan holds 1 connection per key, Business 5.
If you exceed your plan's connections there is no error: the oldest connection for that key is closed with an event: closed and the new one takes its place. That way a process that died without telling anyone never locks you out of your own slot.
Path 2: polling /latest
If your program cannot hold a connection open — a serverless function, a cron job, a spreadsheet — polling /latest works well. Two rules make it efficient:
- Every 3 seconds is plenty. The round takes 35 seconds and the data arrives in 5; polling faster only burns your per-minute limit.
- Send the
ETag. Store theETagheader from the last response and return it inIf-None-Match. When nothing has changed the API answers 304 with no body: the request still counts against the limit, but the traffic and the work on your side drop a lot.
etag = None
while True:
headers = {"x-api-key": "YOUR_KEY"}
if etag:
headers["if-none-match"] = etag
r = requests.get("https://api.lynxmetrics.com/v1/lightning-baccarat/latest", headers=headers, timeout=10)
if r.status_code == 200:
etag = r.headers.get("etag")
handle(r.json()["data"])
time.sleep(3)And always compare the round's id with the last one you handled. That is how you never publish the same hand twice, and it applies to both paths.
Stream, polling or webhook: which to choose
| Stream (SSE) | Polling /latest | Webhook | |
|---|---|---|---|
| Extra delay beyond the ~5s | none | half your interval, on average | — |
| Per-minute limit spent | 1 on open | 1 per request | — |
| Recovers what you missed | yes, with last-event-id | yes, with after | — |
| Needs a server of your own | yes, a running process | no | yes, a public address |
| Available at LynxMetrics | yes | yes | no |
Webhooks are the question we get most, and the answer is straightforward: they do not exist today. A webhook needs a public address, request signing and a retry queue on our side, and it delivers worse than the stream for anyone who already has a process running. The stream covers the same case with fewer parts.
Next step
With the stream running, posting the hand to a group is the next step, and it is ready in how to build a Lightning Baccarat Telegram bot. To understand every field that arrives in the event, see the Lightning Baccarat API and the documentation.
Frequently asked questions
- What is the delay between a Lightning Baccarat round and the data in the API?
About 5 seconds between the hand closing and the data being stored, measured in production. More than 90% of that is the reader confirming the cards, and every stream round carries receivedAt and sentAt so you can measure it yourself.
- Does LynxMetrics have a webhook for Lightning Baccarat?
No. To receive every round the moment it is stored, use the /stream endpoint, which keeps an HTTP connection open (Server-Sent Events). It covers the same use case with fewer moving parts than a webhook.
- How do I reconnect to the stream without losing hands?
Send the id of the last hand you received in the last-event-id header when reopening the connection. The ready event comes back with missed, the hands that closed while you were away, up to 50. Beyond that you get resyncError too_many_missed and finish syncing through /results?after=.
- How many stream connections can I keep open?
One per key on the Pro plan and five on Business. If you open more with the same key, the oldest connection is closed with an event: closed and the new one takes its place, with no error.
- Does the phase event say what the result will be?
No. It is optional, arriving only if you open the connection with ?phases=1, and it says the table started resolving the hand, with the id that hand will have, before the cards are read. It is there to tie what your program records to the right hand before the result; a hand with an unsafe read is discarded and never shows up as a round.
- Can I use the stream straight from the browser?
It is not recommended. The browser's EventSource does not send headers, so the key cannot travel with it, and a key in the browser would be visible to any visitor. Use an HTTP client on the server.
For adults 18 and over only. LynxMetrics is not affiliated with Evolution or with the casinos that offer Lightning Baccarat, and it only sells data and stats, never predictions or betting tips, because every round is random and past results do not predict the next one.
Read also
- Lightning Baccarat API: endpoints, examples and limits
How LynxMetrics' Lightning Baccarat API works: every round's cards in JSON, the four endpoints, Python and Node examples, history, pricing and a free trial.
- How to build a Lightning Baccarat Telegram bot
Step by step to post every Lightning Baccarat round to a Telegram group: create the bot, hook it to the API stream, format the cards and avoid repeats.
- Lightning Baccarat accuracy: a 143-round audit
The audit we ran before opening the Lightning Baccarat API: 143 rounds checked against an external source and frame by frame, and what we still watch daily.