Skip to main content

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 in
    • blockTime: <u64> - estimated production time, as Unix timestamp ( milliseconds since the Unix epoch) of when the transaction was processed. null if not available
    • signature: <string> - the transaction signature, as base-58 encoded string
    • error: <object|null> - Error if transaction failed, null if transaction succeeded
    • fee: <u64> - transaction fee in lamports
    • feePayer: <string> - pubkey of the fee payer, as base-58 encoded string
    • computeUnitsConsumed: <u64|undefined> - number of compute units consumed by the transaction
    • preBalances: <array[u64]> - array of u64 account balances from before the transaction was processed
    • postBalances: <array[u64]> - array of u64 account balances after the transaction was processed
    • stateRoot: <string> - recent state root (blockhash) from the transaction message
    • signatures: <array[string]> - array of string signatures
    • accounts: <array[object]> - array of accounts
      • pubkey: <string> - pubkey as base-58 encoded string
      • isSigner: <bool> - was the account a signer
      • isWriteable: <bool> - was the account writeable
    • instructions: <array[object]> - array of parsed instructions
      • programId: <string> - identifier of the program
      • ixRawData: <string> - raw instruction data
      • parseErr: <string|null> - optional error encountered during parsing
      • programName: <string|null> - optional name of the program
      • ixName: <string|null> - optional name of the instruction
      • ixData: <object|null> - optional parsed instruction data
      • ixDiscriminator: <u64|null> - optional instruction discriminator
      • accounts: <array[object]> - list of account metadata for the instruction
        • name: <string|name> - parsed name of the account
        • pubkey: <string> - pubkey as base-58 encoded string
        • isSigner: <bool> - was the account a signer
        • isWriteable: <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 processed
    • postTokenBalances: <array[object]> - List of token balances from after the transaction was processed
    • parseTransactionErrors: <array[object]|null> - optional array of transaction parsing errors
      • key: <string> - identifier for the rpcX package used for parsing
      • params: <string> - parameters passed to the rpcX package
      • error: <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
}
}
}