> ## Documentation Index
> Fetch the complete documentation index at: https://docs.soo.network/llms.txt
> Use this file to discover all available pages before exploring further.

# GetTransaction

## getTransaction RPC Method

Returns transaction details for a confirmed transaction.

<div className="grid grid-cols-2 gap-1 mt-2">
  <div className="col-span-1">
    #### Parameters

    `string` **required**\
    Transaction signature

    * Base-58 encoded string

    `object` **optional**\
    Configuration object containing the following fields:

    **commitment** `string` **optional**\
    The level of commitment desired when querying state

    * `processed` is not supported

    **maxSupportedTransactionVersion** `number` **optional**\
    Set the max transaction version to return in responses

    * If the requested transaction is a higher version, an error will be returned
    * If omitted, only legacy transactions will be returned

    **encoding** `string` **optional**\
    Encoding for the returned Transaction

    * Default: `json`

    **Allowed Encoding Values:**

    * `json`
    * `jsonParsed`
    * `base64`
    * `base58`
  </div>

  <div className="col-span-1">
    #### Code Sample

    ```bash theme={"system"}
    curl https://rpc.testnet.soo.network/rpc \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getTransaction",
      "params": [
        "5ThJTCxpdn54bk3gBAWKZS4K9ogHEX56WooYbXQDnm3Q",
        {
          "commitment": "finalized",
          "encoding": "jsonParsed",
          "maxSupportedTransactionVersion": 0
        }
      ]
    }'
    ```

    #### Response

    ```json theme={"system"}
    {
      "jsonrpc": "2.0",
      "result": {
        "slot": 369624,
        "transaction": {
          "message": {
            "accountKeys": [
              "5ThJTCxpdn54bk3gBAWKZS4K9ogHEX56WooYbXQDnm3Q"
            ],
            "instructions": []
          },
          "signatures": []
        },
        "blockTime": 1701234567,
        "meta": {
          "fee": 5000,
          "err": null,
          "preBalances": [1000000],
          "postBalances": [994000],
          "innerInstructions": null,
          "logMessages": [],
          "rewards": null
        }
      },
      "id": 1
    }
    ```
  </div>
</div>

#### Result Details

The result can be:

* `<null>` - If transaction is not found or not confirmed

* `<object>` - If transaction is confirmed, containing:

  * `slot: <u64>`
    * Slot where the transaction was processed

  * `transaction: <object|[string,encoding]>`
    * Transaction details
    * Format depends on selected encoding

  * `blockTime: <i64|null>`
    * Estimated production time
    * Unix timestamp of transaction processing
    * `null` if timestamp unavailable

  * `meta: <object|null>`
    * Transaction status metadata:
      * `err: <object|null>` - Transaction error details
      * `fee: <u64>` - Transaction fee
      * `preBalances: <array>` - Account balances before transaction
      * `postBalances: <array>` - Account balances after transaction
      * `innerInstructions: <array|null>` - Inner instructions
      * `logMessages: <array|null>` - Transaction log messages
      * `rewards: <array|null>` - Transaction-level rewards

  * `loadedAddresses: <object|undefined>`
    * Addresses loaded from address lookup tables

  * `returnData: <object|undefined>`
    * Most recent return data from transaction instructions

  * `computeUnitsConsumed: <u64|undefined>`
    * Compute units used by the transaction

  * `version: <"legacy"|number|undefined>`
    * Transaction version

#### Important Notes

* Supports various encoding formats
* Provides comprehensive transaction details
* Optional parameters allow fine-tuned querying
