getSignatureStatuses

Learn about getSignatureStatuses—its use cases, code examples, request parameters, response structure, and practical tips.

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

{
  "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

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);

Example Response

{
  "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

Last updated