# 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](/solana/rpc-calls/solana-websockets/accountsubscribe.md) – Subscribes to updates on a specific account’s data.\
  Useful for tracking balance changes or state updates in real time.
* [accountUnsubscribe](/solana/rpc-calls/solana-websockets/accountunsubscribe.md) – Cancels an active account subscription to stop receiving updates.
* [blockSubscribe](/solana/rpc-calls/solana-websockets/blocksubscribe.md) – Subscribes to notifications whenever a new block is produced.\
  Ideal for syncing block data or triggering logic based on finalized blocks.
* [blockUnsubscribe](/solana/rpc-calls/solana-websockets/blockunsubscribe.md) – Unsubscribes from block updates.
* [logsSubscribe](/solana/rpc-calls/solana-websockets/logssubscribe.md) – 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](/solana/rpc-calls/solana-websockets/logsunsubscribe.md) – Stops receiving program log updates.
* [programSubscribe](/solana/rpc-calls/solana-websockets/programsubscribe.md) – Subscribes to changes in all accounts owned by a specific program.\
  Useful for monitoring a protocol’s account activity across the network.
* [programUnsubscribe](/solana/rpc-calls/solana-websockets/programunsubscribe.md) – Unsubscribes from a program update stream.
* [signatureSubscribe](/solana/rpc-calls/solana-websockets/signaturesubscribe.md) – Subscribes to status updates for a given transaction signature.\
  Used to monitor whether a specific transaction gets confirmed or fails.
* [signatureUnsubscribe](/solana/rpc-calls/solana-websockets/signatureunsubscribe.md) – Stops tracking a specific transaction signature.
* [slotSubscribe](/solana/rpc-calls/solana-websockets/slotsubscribe.md) – Subscribes to notifications whenever a new slot is processed.\
  Useful for applications that need to stay in sync with the network clock.
* [slotUnsubscribe](/solana/rpc-calls/solana-websockets/slotunsubscribe.md) – Ends the slot subscription.

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shyft.to/solana/rpc-calls/solana-websockets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
