getTransaction - Solana
getTransaction. Retrieves detailed information about a specific transaction
getTransaction - solana [Value: 59CU]
Retrieves detailed information about a specific transaction, including its status and metadata
Use cases
- Fetch detailed information about a specific transaction
- Verify transaction details for auditing and compliance
- Analyze transaction data for security and tracking
Constraints
- Only provides information for the specified transaction
- Requires real-time network data for accuracy
- API rate limits may restrict frequent requests
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl https://solana.drpc.org \
-X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc": "2.0","id": 1,"method": "getTransaction","params": ["D13jTJYXoQBcRY9AfT5xRtsew7ENgCkNs6mwwwAcUCp4ZZCEM7YwZ7en4tVsoDa7Gu75Jjj2FgLXNUz8Zmgedff",{"encoding": "jsonParsed","maxSupportedTransactionVersion":0}]}'
Response
200
{
"jsonrpc": "2.0",
"result": {
"slot": 98123569,
"meta": {
"err": null,
"fee": 5000,
"preBalances": [
1000000,
5000
],
"postBalances": [
995000,
0
],
"innerInstructions": [],
"logMessages": [],
"preTokenBalances": [],
"postTokenBalances": [],
"rewards": [],
"loadedAddresses": {
"writable": [],
"readonly": []
}
},
"transaction": {
"signatures": [
"5f84uRa5xsJv7iyzVfXTXQJ7ySskAqYYeXYaz5VUKxf2FLVzFfcs8QePFE3yQieYMDm4K8F1wfwStP6dTrY7gjvZ"
],
"message": {
"accountKeys": [
{
"pubkey": "9vNYXEehFV8V1jxzjH7Sv3BBtsYZ92HPKYP1stgNGHJE",
"signer": true,
"writable": true
},
{
"pubkey": "HUNMbn6FnUDoFmrATKUkq3GjSRjWX4ytkX4nvP7XNYfH",
"signer": false,
"writable": true
}
],
"instructions": [],
"recentBlockhash": "8LiyWuxtdHEH7ik6u1E5yy8TP4Fm1ZJdN6K8zmrtyjsW"
}
}
},
"id": 1
}
Request params
idinteger
jsonrpcstring
methodstring
array
tx_sigstring
The transaction signature encoded in base-58 format
maxSupportedTransactionVersionstring
The highest transaction version to return in responses. If a block contains a higher version, an error is returned. If omitted, only legacy transactions are returned, and blocks with versioned transactions will cause an error.
commitmentstring
The level of commitment required for the query
- finalized - The node will query the most recent block confirmed by supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized
- confirmed - The node will query the most recent block that has been voted on by supermajority of the cluster
- processed - The node will query its most recent block. Note that the block may not be complete
Response
200
Contains detailed information about the transactionResponse params
object
idinteger
jsonrpcstring
resultstring
object
blockTimeint64
The timestamp of the block. null indicates that the time is not available.
versionnumber
The version of the transaction. It is undefined if maxSupportedTransactionVersion was not set in the request parameters.
parentSlotinteger
The slot number of the parent block.
slotstring
The slot number in which the transaction was processed.
transactionsarray_of_objects
A list of transactions included in the block.
object
metaobject
Metadata about the transaction
object
errobject
Error information, null if no error.
feeuint64
Transaction fee in lamports.
innerInstructionsarray
List of inner instructions.
object
indexinteger
Specifies the order in which the instruction was executed within the transaction.
programstring
Data associated with the program executed in the block's transactions.
programIdstring
The ID of the program that executed the instruction.
stackHeightstring
The current depth of the execution stack.
instructionsarray
A list of instructions executed within the block's transactions.
object
parsedarray
A list of instructions parsed and executed within the block's transactions.
object
infoarray
Additional details about the transactions within the block
object
lamportsint64
The number of lamports (smallest unit of SOL) assigned to this account.
ownerstring
Base-58 encoded public key of the program assigned to this account
newAccountstring
The new account created as part of the transaction.
executablestring
dicates if the account contains a program and is read-only.
sourcestring
The source account that funded the transaction.
spaceinteger
The storage space required for the transaction.
sourcestring
The type of block, used to differentiate between regular and special blocks like snapshots or transaction confirmations
logMessagesarray
Log messages from the transaction execution.
postBalancesarray
Balances of accounts after the transaction.
postTokenBalancesarray
Token balances of accounts after the transaction
preBalancesarray
TBalances of accounts before the transaction.
preTokenBalancesarray
Token balances of accounts before the transaction
statusarray
loadedAddressesobject
Addresses loaded from address lookup tables for the transaction. This is undefined if maxSupportedTransactionVersion was not specified in the request parameters.
object
writablearray_of_strings
readonlyarray_of_strings
logMessagesarray
A list of log messages generated by the block's transactions, not included if inner instruction recording is disabled
postBalancesarray
Lamport balances for each account in the block after processing the transactions.
postTokenBalancesarray
Token balances for each token account in the block after processing the transactions, omitted if inner instruction recording is disabled
object
mintstring
Information about the creation of new tokens
ownerstring
The base-58 encoded public key of the program assigned to this account
accountIndexinteger
The position of an account within a transaction.
uiTokenAmountobject
object
amountstring
Raw token supply, without decimals, as a u64 integer.
decimalsinteger
Number of decimal places the token uses.
uiAmountstring
Total token supply with mint-prescribed decimals (DEPRECATED).
uiAmountStringstring
Total token supply as a string, with mint-prescribed decimals.
preBalancesarray
Lamport balances for each account in the block before processing the transactions.
preTokenBalancesarray
Token balances for each token account in the block before processing the transactions, omitted if inner instruction recording is disabled
object
mintstring
Information about the creation of new tokens
ownerstring
The base-58 encoded public key of the program assigned to this account
accountIndexinteger
The position of an account within a transaction.
uiTokenAmountobject
object
amountstring
Raw token supply, without decimals, as a u64 integer.
decimalsinteger
Number of decimal places the token uses.
uiAmountstring
Total token supply with mint-prescribed decimals (DEPRECATED).
uiAmountStringstring
Total token supply as a string, with mint-prescribed decimals.
rewardsboolean
Indicates whether to include the rewards array
statusboolean
signaturesarray
transactionobject
The transaction object, which can be in JSON format or encoded binary data, depending on the specified encoding.
object
recentBlockHashstring
messagearray
A list of transactions included in the block.
object
programstring
Data associated with the program executed in the block's transactions.
programIDstring
The ID of the program that executed the instruction.
accountKeysarray
A list of public keys for accounts accessed during transaction execution in the block.
object
pubkeystring
The public key of the program, encoded in base-58.
signerstring
Used to sign transactions in the block and to verify the authenticity of signatures.
sourcestring
The account that funded the transaction.
writableboolean
Indicates whether the accounts associated with the given public keys were modified by the transactions.
instructionsarray
A list of instructions executed within the block's transactions.
object
typestring
The type of block, distinguishing between regular blocks and special blocks such as snapshot or transaction confirmation blocks.
parsedarray
A list of parsed instructions executed within the block's transactions.
object
infoarray
Additional details about the transactions within the block.
object
accountstring
An address on the Solana blockchain used to store assets
mintobject
Information about the creation of new tokens.
systemProgramstring
The system program that executed the transaction.
tokenProgramobject
Manages the supply and balance of the token and executes transfers between accounts.
walletobject
Used for managing and storing assets