# Solana Websocket Methods

After connecting to the RPC PubSub websocket at `ws://<ADDRESS>/`:

* Submit subscription requests to the websocket using the methods below
* Multiple subscriptions may be active at once
* Many subscriptions take the optional [`commitment` parameter](https://solana.com/docs/rpc#configuring-state-commitment), defining how finalized a change should be to trigger a notification. For subscriptions, if commitment is unspecified, the default value is `finalized`.

#### **Subscription Methods**

These methods allow clients to subscribe to real-time updates about on-chain events through Solana’s WebSocket-based PubSub system. They're essential for building reactive applications like explorers, dashboards, bots, and monitoring tools.

* [accountSubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/accountsubscribe) – Subscribes to updates on a specific account’s data.\
  Useful for tracking balance changes or state updates in real time.
* [accountUnsubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/accountunsubscribe) – Cancels an active account subscription to stop receiving updates.
* [blockSubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/blocksubscribe) – Subscribes to notifications whenever a new block is produced.\
  Ideal for syncing block data or triggering logic based on finalized blocks.
* [blockUnsubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/blockunsubscribe) – Unsubscribes from block updates.
* [logsSubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/logssubscribe) – Subscribes to program log outputs (e.g., emitted via `msg!()` in Solana programs).\
  Helpful for debugging, tracking program activity, or triggering off-chain events.
* [logsUnsubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/logsunsubscribe) – Stops receiving program log updates.
* [programSubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/programsubscribe) – Subscribes to changes in all accounts owned by a specific program.\
  Useful for monitoring a protocol’s account activity across the network.
* [programUnsubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/programunsubscribe) – Unsubscribes from a program update stream.
* [signatureSubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/signaturesubscribe) – Subscribes to status updates for a given transaction signature.\
  Used to monitor whether a specific transaction gets confirmed or fails.
* [signatureUnsubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/signatureunsubscribe) – Stops tracking a specific transaction signature.
* [slotSubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/slotsubscribe) – Subscribes to notifications whenever a new slot is processed.\
  Useful for applications that need to stay in sync with the network clock.
* [slotUnsubscribe](https://docs.shyft.to/solana/rpc-calls/solana-websockets/slotunsubscribe) – Ends the slot subscription.

These real-time methods are vital for building event-driven dApps that respond to Solana state changes as they happen.
