Skip to main content
Use slot updates for progress and status, block metadata for hashes and counts, and full blocks when you need the included transactions or account writes. Save the quickstart helper as stream.mts in the same directory. These examples use the same environment variables and dependencies.

Subscribe to slots and metadata

slots.mts
filterByCommitment: true aligns slot notifications with the request commitment. A slot can have several status updates; keep status as well as slot number when recording transitions.

Request filtered blocks

filtered-blocks.mts
The three include flags control transactions, accounts, and entries independently. A filtered transaction array can be smaller than the block’s total executed transaction count.

Handle missing slots

Slots are opportunities to produce blocks; some have no block. A gap can also come from a disconnect, filtering, or lag. Compare commitment and RPC block availability before counting a gap as lost data. Measure actual slot intervals instead of assuming a fixed delivery time.

Entry metadata

Reliability and performance