# dag\_getTransaction

Returns information about a transaction by hash. If the transaction object is returned, the transaction was included in a block and lives in the network.

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

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

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

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

Transaction

```typescript
type Transaction = {
  hash: String<Hash> // Hash of the transaction
  amount: Number // Amount sent in DATUM
  source: Address // Address of the sender
  destination: Address // Address of the receiver
  fee: Number // Fee sent in DATUM
  parent: {
    hash: String<Hash> // Hash of the parent transaction
    ordinal: Number // Ordinal of the parent transaction
  } 
  blockHash: String<Hash> // Hash of the block
  snapshotHash: String<Hash> // Hash of the snapshot
  snapshotOrdinal: Number // Ordinal of the snapshot
  transactionOriginal: {
    value: {
      source: Address // Address of the sender
      destination: Address // Address of the receiver
      amount: Number // Amount sent in DATUM
      fee: Number // Fee sent in DATUM
      parent: {
        hash: String<Hash> // Hash of the parent transaction
        ordinal: Number // Ordinal of the parent transaction
      }
      salt: BigNumber | String // Salt
    }
    proofs: Proof[] // Proofs
  }
  timestamp: String // Timestamp
}
```

Proof

```typescript
type Proof = {
  id: String // Id of the signature
  signature: String // Signature
}
```

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

```typescript
await provider.request({
  method: "dag_getTransaction",
  params: [
    "5659d17c234d57c57a7335792889fe50cf66ec3d717b5d28d9bfa943e4275d27"
  ],
});

// {
//   "hash": "5659d17c234d57c57a7335792889fe50cf66ec3d717b5d28d9bfa943e4275d27",
//   "amount": 100000000,
//   "source": "DAG77zerQ2BUVhtVgkmseihkEfLXieBBm57vqA4J",
//   "destination": "DAG2fMnbEmsWhgYGhvdREVELyESKUqGNTEWf4B61",
//   "fee": 0,
//   "parent": {
//       "hash": "3826c2848a477ff40e3ae27d5b9f99bd2d4a30cd2702873a740dc7c77792310a",
//       "ordinal": 32
//   },
//   "blockHash": "f2df30d776dbf05240b14654d2e156099b25ff6e45084eac9ab89c37689a2007",
//   "snapshotHash": "f41437fc5fc01483069e8d11ff3597f4c2715f44a859432d3f0041838ff270d2",
//   "snapshotOrdinal": 509453,
//   "transactionOriginal": {
//       "value": {
//           "source": "DAG77zerQ2BUVhtVgkmseihkEfLXieBBm57vqA4J",
//           "destination": "DAG2fMnbEmsWhgYGhvdREVELyESKUqGNTEWf4B61",
//           "amount": 100000000,
//           "fee": 0,
//           "parent": {
//               "ordinal": 32,
//               "hash": "3826c2848a477ff40e3ae27d5b9f99bd2d4a30cd2702873a740dc7c77792310a"
//           },
//           "salt": 8888012531929986
//       },
//       "proofs": [
//           {
//               "id": "b85cbc0d210bfb98de58b9b1c6d195f6ee09e254e489f284756e3ebae82054823b04e64bcc62bb6b20ee8016b819419389037d8d09e278e47fe79645cfd8b166",
//               "signature": "3045022100e597cb6ac5e05e00c03998c11ed4ee0c3d8e42aedd37c19f4968ad494d5357e202205f754fe64410e2d8770b3976eb458c4bd3b22aa8f48609c2577dab88e23ef3fd"
//           }
//       ]
//   },
//   "timestamp": "2023-01-26T15:42:21.970Z"
// }
```


---

# Agent Instructions: 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:

```
GET https://docs.constellationnetwork.io/stargazer-wallet/constellation-rpc-api/dag_gettransaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
