Subscribe to real-time account change notifications via Helius Enhanced WebSockets. 1.5-2x faster than standard Solana WebSocket subscriptions. Requires a Helius Business+ plan.
Returns an EnhancedSubscription that implements AsyncIterable for consuming
notifications and provides an unsubscribe() method.
Optionalconfig: EnhancedAccountSubscribeConfigUnsubscribe from an enhanced account subscription by its server-assigned ID. Helius Enhanced WebSocket method (Business+ plan).
Manually close the underlying WebSocket connections (standard and enhanced). Any subscription call already in flight when this is called still rejects with "WebSocket client is closed", and no new connection is left open.
Subscribe to transaction logs.
Optionalconfig: Readonly<{ commitment?: Commitment }>Subscribe to signature confirmation status.
Optionalconfig: Readonly<{ commitment?: Commitment }>Subscribe to slot updates. slotSubscribe takes no parameters.
Subscribe to real-time transaction notifications via Helius Enhanced WebSockets. Supports filtering by accounts (up to 50,000), vote/failed status, and signatures. Requires a Helius Business+ plan.
Returns an EnhancedSubscription that implements AsyncIterable for consuming
notifications and provides an unsubscribe() method.
Optionalconfig: TransactionSubscribeConfigconst sub = await helius.ws.transactionSubscribe(
{ accountInclude: ["EPjF..."] },
{
commitment: "confirmed",
encoding: "jsonParsed",
// Required for "accounts"/"full" details; 1 opts in to v1 (SIMD-0385)
maxSupportedTransactionVersion: 1,
}
);
for await (const notif of sub) {
console.log(notif.signature, notif.slot);
}
await sub.unsubscribe();
Unsubscribe from a transaction subscription by its server-assigned ID. Helius Enhanced WebSocket method (Business+ plan).
WebSocket RPC subscription client. Provides promisified access to Solana's WebSocket subscriptions (logs, slots, signatures, programs, accounts) and Helius Enhanced WebSocket subscriptions (transactions, accounts).
All standard subscription methods return a
Promisethat resolves to a subscription object with an async iterator.Enhanced methods (
transactionSubscribe,accountSubscribe) use Helius Enhanced WebSockets for 1.5-2x faster streaming with advanced filtering. These require a Business+ plan.