# getSignatureStatuses

The `getSignatureStatuses` RPC method in **CoinVera** allows you to retrieve the processing and confirmation status of one or more transaction signatures. It's a powerful tool to determine whether transactions have been **processed**, **confirmed**, or **finalized** on the Solana network.

By default, this method queries the **recent status cache** on the RPC node. To retrieve status for older transactions, set `searchTransactionHistory` to `true`.

***

#### ✅ Common Use Cases

* **Confirming Transaction Finality**\
  Verify if a transaction has reached a desired confirmation level, such as `confirmed` or `finalized`.
* **Batch Status Lookup**\
  Check the status of up to 256 transactions in a single request—useful after batch sends.
* **UI Updates Based on Status**\
  Display real-time transaction progress in your frontend.
* **Error Checking**\
  Identify failed transactions and inspect error details.

***

#### 🧾 Request Parameters

* `signatures` (array of string) – **Required**\
  An array of base-58 encoded transaction signatures. Up to **256** per call.
* `options` (object) – *Optional*
  * `searchTransactionHistory` (boolean):\
    If `true`, the node will search its full transaction history.\
    If `false` (default), only the recent cache is used.

***

#### 📦 Response Structure

```json
{
  "result": {
    "context": {
      "slot": 12345678
    },
    "value": [
      {
        "slot": 12345678,
        "confirmations": 2,
        "err": null,
        "status": { "Ok": null },
        "confirmationStatus": "confirmed"
      },
      null
    ]
  }
}
```

* **`context.slot`** – Slot when the request was processed.
* **`value[]`** – Array matching the order of requested signatures:
  * If found:
    * `slot`: Slot where the transaction was processed.
    * `confirmations`: Number of blocks confirmed since then. `null` means finalized.
    * `err`: `null` if successful, or error details.
    * `status`: Execution status.
    * `confirmationStatus`: One of `processed`, `confirmed`, `finalized`, or `null`.
  * If not found:
    * `null`: Signature not found (e.g., not in cache and no history search).

***

#### 🧪 Examples

**1. Get Status for Recent Transactions**

Query recent transactions without enabling historical search.

**2. Get Status with `searchTransactionHistory: true`**

Use this when querying older transactions or when unsure if they're still in cache.

***

**Code Examples**

{% tabs %}
{% tab title="Nodejs" %}

```javascript
const fetch = require('node-fetch');

async function getSignatureStatuses(rpcUrl) {
  try {
    const response = await fetch(rpcUrl, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getSignatureStatuses',
        "params": [
            [
              "4boe3PE7Z2JvVuJb71MCNHZMRSGpcgMVFtiWADzGNTQkM6aa6b9xZg21Rs4xckLiDfFHfQNcPimMD7AmWkqS8KWC"
            ],
            {
              "searchTransactionHistory": true
            }
          ]
      }),
    });

    const data = await response.json();
    
    // Print the exact full response
    console.log('Full RPC Response:');
    console.log(JSON.stringify(data, null, 2));
    
    return data;
  } catch (error) {
    console.error('Error getting health:', error.message);
    return null;
  }
}

// Example usage
const RPC_URL = 'https://rpc.coinvera.io/?x-api-key=your-coinvera-x-api-key';

getSignatureStatuses(RPC_URL);
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

def get_signature_statuses(rpc_url):
    try:
        response = requests.post(
            rpc_url,
            headers={
                'Content-Type': 'application/json',
            },
            json={
                'jsonrpc': '2.0',
                'id': 1,
                'method': 'getSignatureStatuses',
                'params': [
                    [
                        '4boe3PE7Z2JvVuJb71MCNHZMRSGpcgMVFtiWADzGNTQkM6aa6b9xZg21Rs4xckLiDfFHfQNcPimMD7AmWkqS8KWC'
                    ],
                    {
                        'searchTransactionHistory': True
                    }
                ]
            }
        )
        
        data = response.json()
        
        # Print the exact full response
        print('Full RPC Response:')
        print(json.dumps(data, indent=2))
        
        return data
        
    except Exception as error:
        print(f'Error getting health: {error}')
        return None

# Example usage
RPC_URL = 'https://rpc.coinvera.io/?x-api-key=your-coinvera-x-api-key'
get_signature_statuses(RPC_URL)
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "apiVersion": "2.2.16",
      "slot": 355395272
    },
    "value": [
      {
        "confirmationStatus": "finalized",
        "confirmations": null,
        "err": null,
        "slot": 355371621,
        "status": {
          "Ok": null
        }
      }
    ]
  },
  "id": 1
}
```

***

#### 💡 Developer Tips

* **Enable `searchTransactionHistory`** for older or uncertain transactions.
* **Limit of 256 Signatures** per request—batch intelligently.
* A **`null` entry in the value array** means:
  * Not found in cache.
  * Not in node history.
  * Transaction was never confirmed.
* **`confirmations: null`** usually indicates the transaction is finalized.
* Use the **`err`** and **`status`** fields to handle transaction failures gracefully.

***

**CoinVera’s `getSignatureStatuses`** is a lightweight yet essential tool for monitoring transaction lifecycles, especially in high-throughput environments. For reliability, always set&#x20;


---

# 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.coinvera.io/integration/solana/rpc/getsignaturestatuses.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.
