Event groups
The Streaming API emits the following event groups:- Trace-based events:
transactions,actions,trace - State updates:
account_state_changeandjettons_change - Invalidation signal:
trace_invalidated
Finality model
Trace-based events carry afinality field according to their finality level:
pending— result of emulation or speculative execution. This state can be invalidated (trace_invalidated).confirmed— trace or transactions are included in a candidate shard block. Rollback chance is very small, but still possible.finalized— committed in the masterchain and will not be updated nor invalidated.
account_state_changeandjettons_changeare emitted only whenfinalityfield is set to eitherconfirmedorfinalized.trace_invalidatedapplies to previously emitted trace-based data and is not emitted afterfinalized.
Delivery behavior
Themin_finality field is used to control how early the server emits trace-based updates:
pending— receive every trace snapshot as it moves frompendingtoconfirmedtofinalized.confirmed— skip pure emulation results and start atconfirmedor later.finalized— receive only finalized trace-based events.
- Use
pendingfor the lowest latency. - Use
confirmedfor lower rollback risk with near-real-time delivery. - Use
finalizedwhen only settled data is acceptable.
Supported interfaces
The Streaming API exposes two transports: SSE and a WebSocket. Choose either of the transports to proceed with its usage:SSE: Server-Sent Events
Recommended for browser environments or clients that prefer HTTP streaming and a fixed subscription.
WebSocket
Preferred for persistent, bidirectional communication with dynamic subscription patterns.