preprocessedSubscribe streams signed transactions before they reach the processed commitment level, decoded from shreds as they arrive at the validator, with no deshredding infrastructure required on your side.
This guide builds a monitor that watches a trading program pre-execution, deduplicates the feed, stays under the server’s backpressure limit, and reconciles against processed data before acting.
Scope the subscription to your target
There is no unfiltered stream:accountInclude and accountRequired must name at least one account between them. For a trading monitor, include the program you trade against and exclude noise you’d otherwise pay for:
accountRequired field instead.
Decode frames and deduplicate by signature
Notifications arrive as binary frames: a 73-byte prefix, then the bincode-serialized transaction. The signature is in the prefix so you can deduplicate without decoding the body. The stream aggregates several pre-execution sources, and the same transaction can arrive more than once:monitor.js
Keep the receive loop faster than the stream
Helius does not buffer indefinitely for slow consumers: if more than 4,000 messages back up server-side, the connection is closed. That is why the handler above only reads the 73-byte prefix and enqueues. Deserialization and strategy logic run in a separate loop:Reconcile against processed data
A preprocessed transaction shows what the sender tried to do, not what happened. It carries no execution status, balance changes, or logs, and it can fail, be dropped, or land on a different fork. Delivery is best-effort with no historical replay, so:- Reconcile against
transactionSubscribeatprocessedorconfirmedcommitment before your strategy books anything as fact. - On disconnect, resubscribe immediately and accept the gap, since there is no replay to backfill it.
- If you need real-time account state rather than transaction intents, that only exists post-execution: use LaserStream gRPC at
processed.
Related guides
preprocessedSubscribe reference
Full payload layout, filter rules, backpressure, and pricing
Trade on Preconfirmations
The earliest transaction signal Helius offers, from the scheduler itself