getParsedTransaction
Returns parsed transaction details for a confirmed transaction. The transaction can be parsed in a customizeable way if additional parse requests are included as arguments. This endpoint relies on rpcX packages to parse the transaction. Packages included in parse requests must implement the transaction transformer interface.
Parameters
Signature <string>
- Transaction signature, as base-58 encoded string
Parse Transaction Requests array<object>
(optional)
-
Array of objects containing the following fields:
-
key: <string>
- Which rpcX package will be used to transform the transaction -
command: <string>
- Which command will be used to transform the transaction -
params: <string>
- Any additional params that must be passed to the rpcX package
-
Result
<null>
- if transaction is not found or not confirmed<object>
- if transaction is confirmed, an object with the following fields:slot: <u64>
- the slot this transaction was processed inblockTime: <u64>
- estimated production time, as Unix timestamp ( milliseconds since the Unix epoch) of when the transaction was processed. null if not availablesignature: <string>
- the transaction signature, as base-58 encoded stringerror: <object|null>
- Error if transaction failed, null if transaction succeededfee: <u64>
- transaction fee in lamportsfeePayer: <string>
- pubkey of the fee payer, as base-58 encoded stringcomputeUnitsConsumed: <u64|undefined>
- number of compute units consumed by the transactionpreBalances: <array[u64]>
- array of u64 account balances from before the transaction was processedpostBalances: <array[u64]>
- array of u64 account balances after the transaction was processedstateRoot: <string>
- recent state root (blockhash) from the transaction messagesignatures: <array[string]>
- array of string signaturesaccounts: <array[object]>
- array of accountspubkey: <string>
- pubkey as base-58 encoded stringisSigner: <bool>
- was the account a signerisWriteable: <bool>
- was the account writeable
instructions: <array[object]>
- array of parsed instructionsprogramId: <string>
- identifier of the programixRawData: <string>
- raw instruction dataparseErr: <string|null>
- optional error encountered during parsingprogramName: <string|null>
- optional name of the programixName: <string|null>
- optional name of the instructionixData: <object|null>
- optional parsed instruction dataixDiscriminator: <u64|null>
- optional instruction discriminatoraccounts: <array[object]>
- list of account metadata for the instructionname: <string|name>
- parsed name of the accountpubkey: <string>
- pubkey as base-58 encoded stringisSigner: <bool>
- was the account a signerisWriteable: <bool>
- was the account writeable
stack_height: <array[number]>
- instruction stack height represented as array of numbers. Format: [0] for top level, [0,0] for first level, [0,0,0] for second level, etc.events: <array[string]>
- array of event strings containing JSON objects parsed by rpcX transaction parser packages
preTokenBalances: <array[object]>
- List of token balances from before the transaction was processedpostTokenBalances: <array[object]>
- List of token balances from after the transaction was processedparseTransactionErrors: <array[object]|null>
- optional array of transaction parsing errorskey: <string>
- identifier for the rpcX package used for parsingparams: <string>
- parameters passed to the rpcX packageerror: <string>
- parse error message
Code sample
curl "https://testnet.atlas.xyz" -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": "798fe2de-cfd4-4219-a9e6-4ab37b4a5b17",
"method": "getParsedTransaction",
"params": [
"2NfTn3kUFP2VZ9ZGNXwVdv3t9gMPqPiKPJXoxZQ7Q8MikuhuFuwGLEWUoNU5L8nzAoPSY21FaqF594n8tv6n1R9Z"
]
}
'
Response
{
"jsonrpc": "2.0",
"id": "798fe2de-cfd4-4219-a9e6-4ab37b4a5b17",
"result": {
"context": {
"slot": 243547140
},
"value": {
"slot": 243546799,
"blockTime": 1736867514125,
"signature": "2NfTn3kUFP2VZ9ZGNXwVdv3t9gMPqPiKPJXoxZQ7Q8MikuhuFuwGLEWUoNU5L8nzAoPSY21FaqF594n8tv6n1R9Z",
"error": null,
"logMessages": [
"Program 11111111111111111111111111111111 invoke [1]",
"Program 11111111111111111111111111111111 success"
],
"returnData": null,
"fee": 5000,
"feePayer": "6TqGq1RgiqA6NHuwdL7uBTUpKGefYdygsjbpiteFbNFd",
"computeUnitsConsumed": 0,
"preBalances": [
688934602029,
0,
1037040
],
"postBalances": [
687934597029,
1000000000,
1037040
],
"stateRoot": "mzMnBWMVFU3dT1bbKvEhTfDBdLBJ86XoA6oWsoSFVpA",
"signatures": [
"2NfTn3kUFP2VZ9ZGNXwVdv3t9gMPqPiKPJXoxZQ7Q8MikuhuFuwGLEWUoNU5L8nzAoPSY21FaqF594n8tv6n1R9Z"
],
"accounts": [
{
"pubkey": "6TqGq1RgiqA6NHuwdL7uBTUpKGefYdygsjbpiteFbNFd",
"isSigner": true,
"isWritable": true
},
{
"pubkey": "859NNrYstC3C4YY4jjZEm5sigXdjqiMdSCVvTEnK8JLc",
"isSigner": false,
"isWritable": true
},
{
"pubkey": "11111111111111111111111111111111",
"isSigner": false,
"isWritable": false
}
],
"instructions": [
{
"programId": "11111111111111111111111111111111",
"ixRawData": "AgAAAADKmjsAAAAA",
"programName": "System",
"ixName": "Transfer",
"ixData": {
"lamports": "1000000000"
},
"ixDiscriminator": 2,
"accounts": [
{
"name": "From",
"pubkey": "6TqGq1RgiqA6NHuwdL7uBTUpKGefYdygsjbpiteFbNFd",
"isSigner": true,
"isWritable": true
},
{
"name": "To",
"pubkey": "859NNrYstC3C4YY4jjZEm5sigXdjqiMdSCVvTEnK8JLc",
"isSigner": false,
"isWritable": true
}
],
"stackHeight": "0",
"events": []
}
],
"preTokenBalances": [],
"postTokenBalances": [],
"parseTransactionErrors": null
}
}
}