> For the complete documentation index, see [llms.txt](https://docs.constellationnetwork.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.constellationnetwork.io/stargazer-wallet/ethereum-rpc-api/eth_gettransactionbyhash.md).

# eth\_getTransactionByHash

Returns information about a transaction by hash.

**Parameters**[**​**](https://docs.constellationnetwork.io/stargazer/APIReference/ethereumRPCAPI/eth_getTransactionByHash#parameters)

| Name            | Type              | Description                       |
| --------------- | ----------------- | --------------------------------- |
| TransactionHash | `HexString<Hash>` | Hash of the selected transaction. |

**Return Type**[**​**](https://docs.constellationnetwork.io/stargazer/APIReference/ethereumRPCAPI/eth_getTransactionByHash#return-type)

`Transaction` | `null` - Transaction object or null if not found.

Transaction

```typescript
type Transaction = {
  hash: HexString<Hash>; // Hash of the transaction.
  from: Address; // Address of the sender.
  to: Address | null; // Address of the receiver or null for contract creations.
  value: HexString<Number>; // Value sent in WEI.

  blockHash: HexString<Hash> | null; // Block hash of transaction or null if transaction is pending.
  blockNumber: HexString<Number> | null; // Block number of transaction or null if transaction is pending.
  nonce: HexString<Number>; // Number of transactions made by the sender before.

  gas: HexString<Number>; // Gas units provider by the sender.
  gasPrice: HexString<Number>; // Gas price provider by the sender in WEI.
  maxFeePerGas?: HexString<Number>; // Maximum fee in WEI per gas unit. EIP-1559.
  maxPriorityFeePerGas?: HexString<Number>; // Maximum fee in WEI per gas unit above the base fee. EIP-1559.

  input: HexString; // Data sent with the transaction.

  r: HexString; // ECDSA signature r.
  s: HexString; // ECDSA signature s.
  v: HexString; // ECDSA recovery ID.

  transactionIndex: HexString<Number> | null; // Transaction index in block or null if transaction is pending.
  type: HexString<Number>; // Transaction type
};
```

**Example**[**​**](https://docs.constellationnetwork.io/stargazer/APIReference/ethereumRPCAPI/eth_getTransactionByHash#example)

```typescript
await provider.request({
  method: "eth_getTransactionByHash",
  params: [
    "0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0",
  ],
});

/* {
  blockHash:
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
  blockNumber: "0x5bad55",
  from: "0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98",
  gas: "0x249f0",
  gasPrice: "0x174876e800",
  hash: "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
  input:
    "0x6ea056a900000000000...",
  nonce: "0x5e4724",
  r: "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec",
  s: "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410",
  to: "0x4b9c25ca0224aef6a7522cabdbc3b2e125b7ca50",
  transactionIndex: "0x0",
  type: "0x0",
  v: "0x25",
  value: "0x0",
} */
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.constellationnetwork.io/stargazer-wallet/ethereum-rpc-api/eth_gettransactionbyhash.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
