getTransaction
Returns transaction details for a confirmed transaction signature. Provides comprehensive information about the transaction including its status, fees, logs, and account changes. This method is essential for transaction explorers, wallets, and dApps that need to analyze transaction execution details.
Important: For most modern Solana transactions, you must include maxSupportedTransactionVersion: 0 in the request parameters, otherwise the request will fail with an error if the transaction is a versioned transaction.
Authorizations
Body
jsonrpcstring · enumRequiredExample:
JSON-RPC protocol version
2.0Possible values: idone ofRequiredExample:
Request identifier that will be returned in the response
1stringOptional
numberOptional
methodstring · enumRequiredExample:
The RPC method name
getTransactionPossible values: Responses
200
Successful Response
application/json
401
Unauthorized
text/plain
403
Forbidden
text/plain
429
Too Many Requests
text/plain
500
Internal Server Error
text/plain
post
/curl -X POST https://public.rpc.solanavibestation.com \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getTransaction",
"params": [
"2id3YC2jK9G5Wb2GmXYhqJqhb5S1n9mfK8ydGT6YWq9DJNWjPvAo1e5uDYKKxe8Y2k1Vp4nUJGHG9xEJT1m4F9G",
{
"encoding": "jsonParsed",
"commitment": "finalized",
"maxSupportedTransactionVersion": 0
}
]
}'
{
"jsonrpc": "2.0",
"result": {
"slot": 123456789,
"transaction": {
"message": {
"accountKeys": [
"3UVYmECPPMZSCqWKfENfuoTv51fTDTWicX9xmBD2euKe",
"AjozzgE83A3x1sHNUR64hfH7zaEBWeMaFuAN9kQgujrc"
],
"instructions": [
{
"programIdIndex": 1,
"accounts": [
0
],
"data": "3Bxs4h24kvUPPLQWRDZRQNgr7P2WS6e5zP6"
}
],
"recentBlockhash": 1.1111111111111112e+31
},
"signatures": [
"2id3YC2jK9G5Wb2GmXYhqJqhb5S1n9mfK8ydGT6YWq9DJNWjPvAo1e5uDYKKxe8Y2k1Vp4nUJGHG9xEJT1m4F9G"
]
},
"meta": {
"err": null,
"fee": 5000,
"preBalances": [
1000000000,
26858640
],
"postBalances": [
999995000,
26858640
],
"logMessages": [
"Program 11111111111111111111111111111111 invoke [1]",
"Program 11111111111111111111111111111111 success"
],
"preTokenBalances": [],
"postTokenBalances": [],
"innerInstructions": [],
"status": {
"Ok": null
},
"computeUnitsConsumed": 150
},
"blockTime": 1625097600,
"version": "legacy"
},
"id": 1
}Last updated