includeSource to select either source.
Endpoints
preconfSubscribe is served from the Helius Gatekeeper endpoint:
wss://beta.helius-rpc.com/?api-key=<API_KEY>
beta hostname refers to the Gatekeeper rollout, not the maturity of Preconfirmations — it will become the standard endpoint as traffic migrates to Gatekeeper.
The stream is not continuous. Coverage scales with the share of network stake
forwarding to Helius or running BAM, so expect slots with no messages — handle
these gaps gracefully. See Coverage.
Authorizations
string
required
Your Helius API key, passed as the
api-key query parameter. Preconfs are available on all paid plans.Body
array
Optional. Omit
params to receive every transaction from both Helius and BAM. To narrow the stream, pass a filter object as the first element — filtering happens server-side, so you only pay for and receive the transactions you care about.-32602 (invalid params). Combining includeSource with the deprecated includeBam field also returns -32602. Instruction filters inspect top-level instructions only. They do not match instructions invoked through cross-program invocation (CPI). A memcmp end offset and dataSize must not exceed 4,096 bytes.
Account filters match more than the transaction’s static account keys — Helius resolves v0 address lookup tables server-side, so accountInclude, accountExclude, and accountRequired also match accounts a transaction loads through an ALT.
Region codes
For Helius preconfirmations the region is where Helius ingested the transaction. For BAM preconfirmations it is the regional BAM endpoint that emitted the preconfirmation, not where Helius ingested it. BAM’s Singapore and Dallas endpoints map to
sgp and dal.
Response
integer
Subscription id (needed to unsubscribe)
Notifications
After the JSON acknowledgement, notifications are delivered as binary WebSocket frames (not JSON). Helius and BAM preconfirmations share the same layout. Each frame is a packed byte layout carrying a single transaction:
The payload has no source field. Don’t infer a BAM origin from
tx_index = 0, since other sources may also report 0.
A preconfirmation is an early signal, not a guarantee. The transaction has not yet landed onchain and could still fail or be dropped. Confirm landing through standard commitment checks before treating it as final.
Decoding the transaction
The transaction bytes are forwarded exactly as the validator serialized them, in the standard wire encoding for the transaction’s version. Legacy and v0 transactions use the signatures-first layout thatbincode produces. Transaction v1 (SIMD-0385) uses a message-first layout with signatures at the end, so bincode fails on v1 payloads.
Use a decoder that handles every version. In Rust, agave-transaction-view parses legacy, v0, and v1 transactions in place and is the recommended option; wincode with a current Solana SDK VersionedTransaction also works. In JavaScript, make sure your library version supports transaction v1. See the guide for a Rust example.
Duplicate notifications
Helius and BAM preconfirmations are deduplicated per source, not across sources. A small share of transactions reach Helius through both, so you can receive the same signature twice, and the two copies may report different slots. Deduplicate by signature on the client and make transaction-triggered actions idempotent. See the guide.Pricing
Preconfirmations are available on all paid plans: Developer, Business, Professional, and Enterprise. Free plans are not eligible. See Credits for details. Slots with zero delivered messages cost zero credits, even when the slot has preconfirmation coverage. When a slot delivers at least one message, each openpreconfSubscribe subscription is billed the greater of 300 credits or 10 credits per delivered message. Uncovered slots cost zero. See Pricing for source and region billing eligibility.
Each concurrent subscription is billed independently when it receives at least one message. Close subscriptions you no longer need with
preconfUnsubscribe. With includeSource: ["helius"], BAM-only covered slots are excluded from billing. When regionInclude is set, covered slots outside the selected regions cost zero for that subscription; matching slots are billed only when the subscription receives at least one message.
Billing is per message, not per unique signature. A transaction delivered by both Helius and BAM counts twice. Set includeSource: ["helius"] if you only want Helius preconfirmations.
Related
Preconfirmations Overview
What Preconfirmations are and where they sit in the validator pipeline.
preconfUnsubscribe
Stop a subscription by its id.