getTransaction RPC Method
Returns transaction details for a confirmed transaction.Parameters
string requiredTransaction signature
- Base-58 encoded string
object optionalConfiguration object containing the following fields:commitment
string optionalThe level of commitment desired when querying state
processedis not supported
number optionalSet the max transaction version to return in responses
- If the requested transaction is a higher version, an error will be returned
- If omitted, only legacy transactions will be returned
string optionalEncoding for the returned Transaction
- Default:
json
jsonjsonParsedbase64base58
Result Details
The result can be:-
<null>- If transaction is not found or not confirmed -
<object>- If transaction is confirmed, containing:-
slot: <u64>- Slot where the transaction was processed
-
transaction: <object|[string,encoding]>- Transaction details
- Format depends on selected encoding
-
blockTime: <i64|null>- Estimated production time
- Unix timestamp of transaction processing
nullif timestamp unavailable
-
meta: <object|null>- Transaction status metadata:
err: <object|null>- Transaction error detailsfee: <u64>- Transaction feepreBalances: <array>- Account balances before transactionpostBalances: <array>- Account balances after transactioninnerInstructions: <array|null>- Inner instructionslogMessages: <array|null>- Transaction log messagesrewards: <array|null>- Transaction-level rewards
- Transaction status metadata:
-
loadedAddresses: <object|undefined>- Addresses loaded from address lookup tables
-
returnData: <object|undefined>- Most recent return data from transaction instructions
-
computeUnitsConsumed: <u64|undefined>- Compute units used by the transaction
-
version: <"legacy"|number|undefined>- Transaction version
-
Important Notes
- Supports various encoding formats
- Provides comprehensive transaction details
- Optional parameters allow fine-tuned querying