Skip to main content

getConfirmedTransaction RPC Method

Returns transaction details for a confirmed transaction.

Updated on
Aug 21, 2024

getConfirmedTransaction RPC Method

Please note that this method is deprecated, no longer available on Devnet and Testnet, and will be removed from Mainnet soon. For a similar method you can use Solana's getTransaction RPC method.

Parameters

tx_sig
string
The transaction signature as base-58 encoded string
object
array
The configuration object with the following fields:
encoding
string
(default: json) The encoding format for the transaction data. The values can be one of json, jsonParsed, base58 (slow), base64
commitment
string
(default: finalized) The level of commitment required for the query. The options include:
finalized
string
The node will query the most recent block confirmed by the supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized
confirmed
string
The node will query the most recent block that has been voted on by the supermajority of the cluster

Returns

result
Null if the specified transaction is not confirmed otherwise an object with the following fields:
blockTime
The estimated production time, as Unix timestamp (seconds since the Unix epoch). It's null if not available
meta
The transaction status metadata object, which contains additional information about the block and its transactions. The meta object can be null, or it may contain the following fields:
err
Error code if the transaction failed or null if the transaction succeed
fee
The total fees paid by all transactions in the block encoded as u64 integer
innerInstructions
An array of objects representing the inner instructions of all transactions in the block (omitted if inner instruction recording is not enabled). Each object has the following fields:
loadedAddresses
An array of base58-encoded public keys representing the addresses (accounts) involved in the transaction
readonly
A subset of the loadedAddresses that contains accounts that are only read from and not modified by the transaction
writable
A subset of the loadedAddresses that contains accounts that are read from and modified by the transaction
logMessages
An array of strings containing any log messages generated by the block's transactions (omitted if inner instruction recording is not enabled)
postBalances
An array of lamport balances for each account in the block after the transactions were processed
postTokenBalances
An array of token balances for each token account in the block after the transactions were processed (omitted if inner instruction recording is not enabled)
preBalances
An array of lamport balances for each account in the block before the transactions were processed
preTokenBalances
An array of token balances for each token account in the block before the transactions were processed (omitted if inner instruction recording is not enabled)
rewards
An object containing information about the rewards earned by the block's validators (only present if the rewards are requested). It has the following fields:
status
The status of the transaction. It returns Ok if the transaction was successful and Err if the transaction failed with TransactionError
slot
The slot number of the block to retrieve encoded as u64 (64-bit unsigned integer) integer
transaction
The transaction object. It could be either JSON format or encoded binary data, depending on the encoding parameter
message
The core data of the transaction, including its header, account keys, recent blockhash, and instructions
accountKeys
An array of base58-encoded public keys representing the accounts involved in the transactionAn array of base58-encoded public keys representing the accounts involved in the transaction
header
An object containing information about the number of required signatures and readonly accounts in the transaction
numReadonlySignedAccounts
The number of readonly accounts that also require a signature
numReadonlyUnsignedAccounts
The number of readonly accounts that do not require a signature
numRequiredSignatures
The number of signatures required to authorize the transaction
instructions
An array of instructions that were executed in the block's transactions
accounts
An array of base58-encoded public keys representing the accounts to be passed to the instruction
data
A string containing the encoded data to be passed to the instruction
programIdIndex
An integer representing the index of the program ID in the accountKeys array. The program ID is the public key of the on-chain program that executed the instruction
stackHeight
The current depth of the execution stack
recentBlockhash
The recent block hash for the account's cluster
signatures
An array of signatures strings corresponding to the transaction order in the block
Request
1
curl https://docs-demo.solana-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"jsonrpc": "2.0","id": 1,"method": "getConfirmedTransaction","params": ["3Pdh1xgS7HYXcPquN1JQQXs8C6Tn2ZTkHg86wXMwDEEnJxVVZsE3WgxHSx258boUtHcMVkKCGbT9dYWWfk7CWV2m","json"]}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free