> ## Documentation Index
> Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# signatureSubscribe on Solana

> Call signatureSubscribe on Solana via GoldRush JSON-RPC. Subscribes to receive a notification when a transaction is confirmed. Endpoint, parameters, return values, and code examples.

<Card title="0.01 credits per call" icon="coins" />

`signatureSubscribe` on **Solana**: Subscribes to receive a notification when a transaction is confirmed.

## Endpoint

```
wss://rpc.goldrushdata.com/v1/solana-mainnet
```

`signatureSubscribe` is a **WebSocket** subscription method.

Authenticate with `Authorization: Bearer <GOLDRUSH_API_KEY>`. See [authentication](/goldrush-json-rpc/authentication).

## Parameters

| Name        | Type     | Required | Description                                     | Example                                                                                      |
| ----------- | -------- | -------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `signature` | `string` | yes      | Base-58 encoded transaction signature to watch. | `"5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"` |
| `config`    | `object` | no       | `{commitment?, enableReceivedNotification?}`.   | `{"commitment":"finalized"}`                                                                 |

## Returns

`number`: Subscription id (used with `signatureUnsubscribe`). Notifications arrive as `signatureNotification` messages.

```json theme={null}
24006
```

## Examples

<CodeGroup>
  ```bash wscat theme={null}
  # Connect (header auth works from Node/CLI clients):
  wscat -c "wss://rpc.goldrushdata.com/v1/solana-mainnet" \
    -H "Authorization: Bearer $GOLDRUSH_API_KEY"

  # Once connected, send:
  {"jsonrpc":"2.0","id":1,"method":"signatureSubscribe","params":["5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW", {"commitment":"finalized"}]}
  ```

  ```typescript @solana/kit theme={null}
  import { createSolanaRpcSubscriptions } from "@solana/kit";

  // Authenticate with the Authorization: Bearer header on the WS handshake.
  // See /goldrush-json-rpc/authentication.
  const rpcSubscriptions = createSolanaRpcSubscriptions("wss://rpc.goldrushdata.com/v1/solana-mainnet");

  const abortController = new AbortController();
  const notifications = await rpcSubscriptions
    .signatureSubscribe("5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW", {"commitment":"finalized"})
    .subscribe({ abortSignal: abortController.signal });

  for await (const notification of notifications) {
    console.log(notification);
  }
  ```
</CodeGroup>

## Errors

Standard JSON-RPC errors: `-32600` invalid request, `-32601` method not found, `-32602` invalid params.

## Related Subscriptions methods on Solana

* [`accountSubscribe` on Solana](/api-reference/json-rpc/solana/accountsubscribe)
* [`accountUnsubscribe` on Solana](/api-reference/json-rpc/solana/accountunsubscribe)
* [`logsSubscribe` on Solana](/api-reference/json-rpc/solana/logssubscribe)
* [`logsUnsubscribe` on Solana](/api-reference/json-rpc/solana/logsunsubscribe)
* [`programSubscribe` on Solana](/api-reference/json-rpc/solana/programsubscribe)
