getTransaction

Returns the details for a confirmed transaction on the ledger.

Parameters

  • tx_sig (string): The transaction signature as a base-58 encoded string.
  • object: An array containing the configuration object with the following fields:
    • commitment (string): The level of commitment required for the query. Options include:
      • finalized: 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: The most recent block that has been voted on by the supermajority of the cluster.
      • processed: The most recent block queried by the node. Note that the block may not be complete.
    • maxSupportedTransactionVersion (boolean): 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, an object with the following fields:
    • blockTime: The estimated production time, as a 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 a 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).
      • 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. 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.
    • 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.
Language
Authorization
Header
Click Try It! to start a request and see the response here!