SSE streams with replay
One HTTP stream. Start from any checkpoint your plan allows, then continue live with no gap and no duplicate.
Open a stream
curl -N "https://api.tide.ad/v1/stream?topic=transactions&accounts=0xYOUR_ADDRESS&view=enhanced" \
-H "x-api-key: YOUR_API_KEY"The server sends a heartbeat every 15 seconds so proxies keep the connection open.
const url = "https://api.tide.ad/v1/stream?topic=transactions&accounts=0xYOUR_ADDRESS&view=enhanced&api-key=" + process.env.TIDE_API_KEY;
const es = new EventSource(url);
// each topic has its own event name: transaction, event, checkpoint, balance or object
es.addEventListener("transaction", (e) => console.log(JSON.parse(e.data)));Parameters
| Parameter | Meaning |
|---|---|
| topic | transactions, events, checkpoints, balances or objects. |
| view | ids, raw or enhanced. |
| fromCheckpoint | Replay from this checkpoint, then continue live. |
| cursor | Resume after this cursor. Same as the Last-Event-ID header. |
| pending | checkpoints topic only: true adds each checkpoint before it is certified, as event: pending. |
| accounts, coinTypes, eventTypes, packages, objectIds | Filters. Lists are OR within one filter and AND across filters. |
Every filter and view is described in Topics and filters.
Replay
With fromCheckpoint the server reads the index in order at up to 50,000 checkpoints a minute, then joins the live tail at a checkpoint boundary. Your plan sets how far back you can start: 7 days on Free, 90 days on Developer, since genesis on Business and above.
GET /v0/stream/replay-info returns the earliest checkpoint your key may use.
curl "https://api.tide.ad/v0/stream/replay-info" -H "x-api-key: YOUR_API_KEY"Resume
Each message has an id equal to its cursor. A browser EventSource sends it back as Last-Event-ID when it reconnects, and the stream continues from the next message. With curl, send the header yourself.
The heartbeat and the end of each replay chunk also set the id, to the last checkpoint fully delivered. A quiet filter therefore resumes where the scan stopped, not at its last match.
event: reconnect means the server is restarting. An EventSource reconnects on its own and continues with no gap. Other clients reconnect with Last-Event-ID.
Pending checkpoints
On the checkpoints topic, pending=true sends each checkpoint as event: pending before validators certify it, about 100 ms earlier. It is marked pending: true and has no id. The certified checkpoint event with the same number follows. If its digest differs, trust the certified one.
One credit covers 10 delivered events, replayed events included.