in-solana by Supanode

getSignatureStatuses — Solana RPC Method

getSignatureStatuses returns the confirmation status for one or more transaction signatures. This is the primary method for checking whether a transaction has been confirmed, finalized, or has failed.

Parameters

NameTypeRequiredDescription
signaturesstring[]YesArray of base-58 encoded transaction signatures.
searchTransactionHistoryboolNoIf true, searches beyond recent status cache into full transaction history. Default: false.

Request

curl -X POST https://api.mainnet-beta.solana.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getSignatureStatuses",
    "params": [
      ["5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"],
      {"searchTransactionHistory": true}
    ]
  }'

TypeScript (@solana/kit)

import { createSolanaRpc, signature } from "@solana/kit";

const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com");
const statuses = await rpc
  .getSignatureStatuses(
    [signature("5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW")],
    { searchTransactionHistory: true }
  )
  .send();

const status = statuses.value[0];
if (status) {
  console.log(`Confirmation: ${status.confirmationStatus}`);
  console.log(`Error: ${status.err ?? "none"}`);
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": { "slot": 341200000, "apiVersion": "2.2.4" },
    "value": [
      {
        "slot": 341199500,
        "confirmations": null,
        "err": null,
        "confirmationStatus": "finalized"
      }
    ]
  },
  "id": 1
}
FieldTypeDescription
slotu64The slot the transaction was processed in.
confirmationsusize or nullNumber of confirmations since the transaction’s slot. null when finalized.
errobject or nullError object if the transaction failed, null if it succeeded.
confirmationStatusstringprocessed, confirmed, or finalized.

If the signature is not found, the corresponding array entry is null.

Understanding confirmation levels

  • processed — the transaction has been included in a block by the leader but has not yet been voted on by the cluster.
  • confirmed — the block containing the transaction has received a supermajority vote from the cluster. Very unlikely to be rolled back.
  • finalized — the block is part of the finalized chain. Irreversible.

When confirmationStatus is "finalized", confirmations is null because the count is no longer meaningful.

Common errors

  • Signature not found — the value entry is null. Enable searchTransactionHistory for older transactions.
  • Transaction failed — the err field contains the error. The transaction was processed but the instructions failed (e.g., insufficient funds, program error).

Performance

getSignatureStatuses is lightweight for recent transactions. With searchTransactionHistory: false (default), it checks only the recent status cache, which is fast. Enabling searchTransactionHistory may be slower as it queries the ledger.

FAQ

What is the difference between null and a status with err? null means the transaction was not found — it may not have been submitted, may have expired, or is too old for the cache. A status with err means the transaction was processed but failed during execution.

Should I always set searchTransactionHistory to true? No. For polling a recently sent transaction, false is faster. Set it to true only when checking older transactions or when you need to confirm a transaction might not be in the recent cache.

How do I poll for transaction confirmation? After sending a transaction, poll getSignatureStatuses every 2-5 seconds until confirmationStatus reaches your desired level (usually confirmed or finalized), or until the blockhash expires.

Can I check multiple transactions at once? Yes. Pass an array of signatures. The response value array matches the input order. This is efficient for batch confirmation checking.

What does the err field contain? The error object varies by failure type. Common errors include InsufficientFundsForFee, AccountInUse, and InstructionError with a program-specific error code.

Parameters

ParameterTypeRequiredDescriptionDefault
signaturesarrayYesArray of base-58 encoded transaction signatures to query.—
searchTransactionHistoryboolNoIf true, searches the full transaction history. Default: false (recent only).—

Updated: