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

# avax.getAtomicTx

> Gets a transaction by its ID. Optional encoding parameter to specify the format for the returned transaction. Can only be hex when a value is provided.

### Parameters

<ParamField query="chainId" type="string" default="43114" required>
  Unique identifier for a blockchain network.
</ParamField>

<ParamField body="id" type="number" default={1} required>
  Request identifier used to match responses.
</ParamField>

<ParamField body="jsonrpc" type="string" default="2.0" required>
  JSON-RPC version.
</ParamField>

<ParamField body="method" type="string" default="avax.getAtomicTx" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={{}} required>
  Parameters for <code>avax.getAtomicTx</code>:

  <ul>
    <li><code>params.txID</code>: The transaction ID (in CB58 format).</li>
    <li><code>params.encoding</code>: Optional encoding format of the result. Only "hex" is allowed.</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="object">
  The JSON-RPC result.

  <Expandable title="properties">
    <ResponseField name="tx" type="string">
      The encoded transaction data.
    </ResponseField>

    <ResponseField name="encoding" type="string">
      The encoding format used.
    </ResponseField>

    <ResponseField name="blockHeight" type="string">
      The height of the block in which the transaction was included.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=43114 \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "avax.getAtomicTx",
      "params": {}
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {}
  }
  ```
</ResponseExample>
