Skip to main content

getTransaction RPC Method

Returns transaction details for a confirmed transaction.

Updated on
Dec 7, 2023

getTransaction RPC Method

Parameters

tx_sig
string
The transaction signature as base-58 encoded string
object
array
The configuration object with the following fields:
commitment
string
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
processed
string
The node will query its most recent block. Note that the block may not be complete
maxSupportedTransactionVersion
integer
The maximum transaction version to return in responses. If the requested block contains a transaction with a higher version, an error will be returned. If this parameter is omitted, only legacy transactions will be returned, and a block containing any versioned transaction will prompt an error

Returns

result
Null if the specified block is not confirmed otherwise RpcResponse JSON 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 succeeds
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:
index
The index of the instruction in the transaction, which determines the order in which the operations were executed
instructions
An array of instructions that were executed in the block's transactions
parsed
An array of parsed instructions that were executed in the block's transactions
info
An array of information objects that provide additional details about the transactions in the block
lamports
The number of lamports assigned to this account as u64 (64-bit unsigned integer)
newAccount
The new account created as part of the transaction
owner
The base-58 encoded Pubkey of the program this account has been assigned to
source
The source account that funded the transaction
space
The amount of storage space required to store a specific transaction
type
The type of the block. It can be used to differentiate between regular blocks and special blocks such as snapshot or transaction confirmation blocks
program
The data associated with the program that was executed in the block's transactions
programId
The ID of the program that executed the instruction
stackHeight
The current depth of the execution stack
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)
accountIndex
The index of an account within a transaction
mint
Provides information about the creation of new tokens
owner
The base-58 encoded Pubkey of the program this account has been assigned to
uiTokenAmount
The amount of a token transfer in a human-readable format
amount
The amount of a token transfer
decimals
The number of decimal places used by the token
uiAmount
The amount of a token transfer in the smallest unit of the token
uiAmountString
The amount of a token transfer as a string with the appropriate number of decimal places for the token
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)
accountIndex
The index of an account within a transaction
mint
Provides information about the creation of new tokens
owner
The base-58 encoded Pubkey of the program this account has been assigned to
uiTokenAmount
The amount of a token transfer in a human-readable format
amount
The amount of a token transfer
decimals
The number of decimal places used by the token
uiAmount
The amount of a token transfer in the smallest unit of the token
uiAmountString
The amount of a token transfer as a string with the appropriate number of decimal places for the token
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. If the transaction was successful, returns Ok and if the transaction failed with TransactionError, returns Err
slot
The slot number to retrieve block production information
transaction
The transaction object. It could be either JSON format or encoded binary data, depending on the encoding parameter
message
An array of transactions included in the block
accountKeys
An array of public keys associated with the accounts that were accessed during the execution of transactions in the block
pubkey
The Pubkey of program encoded as base-58 string
signer
Used to sign transactions in the block. Also used to identify the signers involved in the block's transactions and to verify the authenticity of the signatures
source
The source account that funded the transaction
writable
A boolean value that indicates whether the accounts associated with the given public keys were modified by the transactions or not
instructions
An array of instructions that were executed in the block's transactions
parsed
An array of parsed instructions that were executed in the block's transactions
info
An array of information objects that provide additional details about the transactions in the block
account
An address on the Solana blockchain that is used to store assets
mint
Provides information about the creation of new tokens
source
The source account that funded the transaction
systemProgram
The system program that executed the transaction
tokenProgram
Responsible for maintaining the supply and balance of the token, and for executing transfers of the token between accounts
wallet
Wallet is used for managing and storing assets
type
The type of the block. It can be used to differentiate between regular blocks and special blocks such as snapshot or transaction confirmation blocks
program
The data associated with the program that was executed in the block's transactions
programId
The ID of the program that executed the instruction
recentBlockhash
The recent block hash for the account's cluster
signatures
The list of transaction signatures contained within a particular block
version
The transaction version. It's undefined if maxSupportedTransactionVersion is not set in the requested parameters
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": "getTransaction","params": ["D13jTJYXoQBcRY9AfT5xRtsew7ENgCkNs6mwwwAcUCp4ZZCEM7YwZ7en4tVsoDa7Gu75Jjj2FgLXNUz8Zmgedff",{"encoding": "jsonParsed","maxSupportedTransactionVersion":0}]}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free