POSTgetTransaction

Returns transaction details for a confirmed transaction

Request Body
jsonrpcstringrequired
idintegerrequired
methodstringrequired
paramsoneOf[]required

It contains following items:

  1. Transaction signature (required)
  2. ConfigurationObject (optional)
params[0]string

Transaction signature, as base-58 encoded string

Responses
idinteger

The request ID

jsonrpcstring

The JSON-RPC version

blockTimeinteger

Estimated production time, as Unix timestamp (seconds since the Unix epoch) of when the transaction was processed. null if not available

metaobject
errobject

Error if transaction failed, null if transaction succeeded.

feeinteger

fee this transaction was charged, as u64 integer

preBalancesinteger[]

array of u64 account balances from before the transaction was processed

postBalancesinteger[]

array of u64 account balances after the transaction was processed

innerInstructionsobject[]

List of inner instructions or null if inner instruction recording was not enabled during this transaction

indexnumber

Index of the transaction instruction from which the inner instruction(s) originated

instructionsobject[]

Ordered list of inner program instructions that were invoked during a single transaction instruction.

programIdIndexnumber

Index into the message.accountKeys array indicating the program account that executes this instruction.

accountsnumber[]

List of ordered indices into the message.accountKeys array indicating which accounts to pass to the program.

datastring

The program input data encoded in a base-58 string.

preTokenBalancesobject[]

List of token balances from before the transaction was processed or omitted if token balance recording was not yet enabled during this transaction

accountIndexnumber

Index of the account in which the token balance is provided for.

mintstring

Pubkey of the token's mint.

ownerstring

Pubkey of token balance's owner.

programIdstring

Pubkey of the Token program that owns the account.

uiTokenAmountobject
amountstring

Raw amount of tokens as a string, ignoring decimals.

decimalsnumber

Number of decimals configured for token's mint.

uiAmountnumber

DEPRECATED Token amount as a float, accounting for decimals.

uiAmountStringstring

Token amount as a string, accounting for decimals.

postTokenBalancesobject[]

List of token balances from after the transaction was processed or omitted if token balance recording was not yet enabled during this transaction

accountIndexnumber

Index of the account in which the token balance is provided for.

mintstring

Pubkey of the token's mint.

ownerstring

Pubkey of token balance's owner.

programIdstring

Pubkey of the Token program that owns the account.

uiTokenAmountobject
amountstring

Raw amount of tokens as a string, ignoring decimals.

decimalsnumber

Number of decimals configured for token's mint.

uiAmountnumber

DEPRECATED Token amount as a float, accounting for decimals.

uiAmountStringstring

Token amount as a string, accounting for decimals.

logMessagesstring[]

array of string log messages or null if log message recording was not enabled during this transaction

rewardsobject[]

transaction-level rewards

pubkeystring

The public key, as base-58 encoded string, of the account that received the reward

lamportsinteger

number of reward lamports credited or debited by the account, as a i64

postBalanceinteger

account balance in lamports after the reward was applied

rewardTypestring (enum)
commissioninteger

vote account commission when the reward was credited, only present for voting and staking rewards

loadedAddressesobject

Transaction addresses loaded from address lookup tables. Undefined if maxSupportedTransactionVersion is not set in request params, or if jsonParsed encoding is set in request params.

writableany[]

Ordered list of base-58 encoded addresses for writable loaded accounts

readonlyany[]

Ordered list of base-58 encoded addresses for readonly loaded accounts

returnDataobject

the most-recent return data generated by an instruction in the transaction, with the following fields:

programIdstring

the program that generated the return data, as base-58 encoded Pubkey

datastring

the return data itself, as base-64 encoded binary data

computeUnitsConsumedinteger

number of compute units consumed by the transaction

versiononeOf

Transaction version. Undefined if maxSupportedTransactionVersion is not set in request params.

string 1string (enum)
number 2number
signaturesstring[]

present if "signatures" are requested for transaction details; an array of signatures strings, corresponding to the transaction order in the block

slotinteger

The slot this transaction was processed in

transactionobject
messageobjectrequired
accountKeysstring[]required

List of base-58 encoded public keys used by the transaction, including by the instructions and for signatures. The first message.header.numRequiredSignatures public keys must sign the transaction.

headerobjectrequired

Details the account types and signatures required by the transaction.

numRequiredSignaturesintegerrequired

The total number of signatures required to make the transaction valid. The signatures must match the first numRequiredSignatures of message.accountKeys.

numReadonlySignedAccountsintegerrequired

The last numReadonlySignedAccounts of the signed keys are read-only accounts. Programs may process multiple transactions that load read-only accounts within a single PoH entry, but are not permitted to credit or debit lamports or modify account data. Transactions targeting the same read-write account are evaluated sequentially.

numReadonlyUnsignedAccountsintegerrequired

The last numReadonlyUnsignedAccounts of the unsigned keys are read-only accounts.

recentBlockhashstringrequired

A base-58 encoded hash of a recent block in the ledger used to prevent transaction duplication and to give transactions lifetimes.

instructionsobject[]required
programIdIndexintegerrequired

Index into the message.accountKeys array indicating the program account that executes this instruction.

accountsinteger[]required

List of ordered indices into the message.accountKeys array indicating which accounts to pass to the program.

datastringrequired

The program input data encoded in a base-58 string.

addressTableLookupsobject[]required
accountKeystringrequired

Base-58 encoded public key for an address lookup table account.

writableIndexesinteger[]required

List of indices used to load addresses of writable accounts from a lookup table.

readonlyIndexesinteger[]required

List of indices used to load addresses of readonly accounts from a lookup table.

signaturesstring[]required

A list of base-58 encoded signatures applied to the transaction. The list is always of length message.header.numRequiredSignatures and not empty. The signature at index i corresponds to the public key at index i in message.accountKeys. The first one is used as the transaction id.

versiononeOf

Transaction version. Undefined if maxSupportedTransactionVersion is not set in request params.

string 1string (enum)
number 2number
X-API-KEY
RequestCU50
cURL
curl -X POST "https://solana-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTransaction",
  "params": [
    "5Pj5fCupXLUePYn18JkY8SrRaWFiUctuDTRwvUy2ML9yvkENLb1QMYbcBGcBXRrSVDjp7RjUwk9a3rLC6gpvtYpZ",
    {
      "commitment": "confirmed",
      "maxSupportedTransactionVersion": 0,
      "encoding": "json"
    }
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "result": {
    "blockTime": 1746479684,
    "meta": {
      "computeUnitsConsumed": 150,
      "err": null,
      "fee": 5000,
      "innerInstructions": [],
      "loadedAddresses": {
        "readonly": [],
        "writable": []
      },
      "logMessages": [
        "Program 11111111111111111111111111111111 invoke [1]",
        "Program 11111111111111111111111111111111 success"
      ],
      "postBalances": [
        989995000,
        10000000,
        1
      ],
      "postTokenBalances": [],
      "preBalances": [
        1000000000,
        0,
        1
      ],
      "preTokenBalances": [],
      "rewards": [],
      "status": {
        "Ok": null
      }
    },
    "slot": 378917547,
    "transaction": {
      "message": {
        "accountKeys": [
          "7BvfixZx7Rwywf6EJFgRW6acEQ2FLSFJr4n3kLLVeEes",
          "6KtbxYovphtE3eHjPjr2sWwDfgaDwtAn2FcojDyzZWT6",
          "11111111111111111111111111111111"
        ],
        "header": {
          "numReadonlySignedAccounts": 0,
          "numReadonlyUnsignedAccounts": 1,
          "numRequiredSignatures": 1
        },
        "instructions": [
          {
            "accounts": [
              0,
              1
            ],
            "data": "3Bxs4NN8M2Yn4TLb",
            "programIdIndex": 2,
            "stackHeight": null
          }
        ],
        "recentBlockhash": "23dwTHxFhSzqohXhdni5LwpuSRpgN36YvVMCAM2VXQSf"
      },
      "signatures": [
        "5Pj5fCupXLUePYn18JkY8SrRaWFiUctuDTRwvUy2ML9yvkENLb1QMYbcBGcBXRrSVDjp7RjUwk9a3rLC6gpvtYpZ"
      ]
    },
    "version": "legacy"
  },
  "id": 1
}