getTransaction RPC Method

Returns transaction details for a confirmed transaction

$ curl https://api.devnet.solana.com -s -X \
> POST -H "Content-Type: application/json" -d '
> {
> "jsonrpc": "2.0",
> "id": 1,
> "method": "getTransaction",
> "params": [
> "5Pj5fCupXLUePYn18JkY8SrRaWFiUctuDTRwvUy2ML9yvkENLb1QMYbcBGcBXRrSVDjp7RjUwk9a3rLC6gpvtYpZ",
> {
> "commitment": "confirmed",
> "maxSupportedTransactionVersion": 0,
> "encoding": "json"
> }
> ]
> }
> '

params

stringrequired

Transaction signature, as base-58 encoded string

objectoptional

Configuration object containing the following fields:

result

Response
{
"jsonrpc": "2.0",
"result": {
"blockTime": 1746479684,
"slot": 378917547,
"version": "legacy"
},
"id": 1
}
object | null

Returns null if transaction is not found or not confirmed, otherwise returns an object containing:

Is this page helpful?