# CEP\_Account.getTransaction()

### Function Signature

<pre class="language-javascript"><code class="lang-javascript"><strong>async getTransaction(BlockID, TxID)
</strong></code></pre>

### Parameters

| Parameter Name | Datatype |
| -------------- | -------- |
| `BlockID`      | String   |
| `TxID`         | String   |

### Example (CommonJS)

```javascript
const { CEP_Account } = require('circular-enterprise-apis');

const Address = 'your-wallet-address';

let account = new CEP_Account();

async function run() {
    //...
   txBlock = "your_tx_block" //usually you get that from getTransactionOutcome
   txID = "your_tx_id" //usually you get that from submitCertificate
   console.log("Transaction ID:", txID);
   console.log("Transaction Block:", txBlock);
 
   console.log("Searching Transaction");
   const getTxResult = await account.getTransaction(txBlock, txID);
   console.log("Get Transaction Result :", getTxResult);
 
   if (getTxResult.Result === 200) {
       console.log("Certificate found :", getTxResult);
       
   } else {
       console.log("Certificate Not Found :", getTxResult.message);
   }
    //...
}

run();
```

### Example (ES Modules)

<pre class="language-javascript"><code class="lang-javascript">import { CEP_Account } from 'circular-enterprise-apis';

const Address = 'your-wallet-address';

let account = new CEP_Account();

async function run() {
    //...
<strong>    txBlock = "your_tx_block" //usually you get that from getTransactionOutcome
</strong>    txID = "your_tx_id" //usually you get that from submitCertificate
    console.log("Transaction ID:", txID);
    console.log("Transaction Block:", txBlock);
  
    console.log("Searching Transaction");
    const getTxResult = await account.getTransaction(txBlock, txID);
    console.log("Get Transaction Result :", getTxResult);
  
    if (getTxResult.Result === 200) {
        console.log("Certificate found :", getTxResult);
        
    } else {
        console.log("Certificate Not Found :", getTxResult.message);
    }
    //...        
}

run();
</code></pre>

### Expected Result

```json
{
   "Result":200,
   "Response":{
      "BlockID":"your_block_id",
      "BroadcastFee":1.0,
      "DeveloperFee":0.0,
      "From":"your_wallet_address",
      "GasLimit":0.0,
      "ID":"your_tx_id",
      "Instructions":0,
      "NagFee":0.5,
      "NodeID":"",
      "Nonce":"299",
      "OSignature":"3046022100e35a304f202b2ee5b7bd639c0560409ef637d1cc560f59770a623da391274ace022100a5dd58f3b6ced7c68d858927a1dba719ee5e076aed998c2a1d4949c958055512",
      "Payload":"your_hex_data",
      "ProcessingFee":7.0,
      "ProtocolFee":3.0,
      "Status":"Executed",
      "Timestamp":"2025:03:23-09:28:15",
      "To":"your_wallet_address",
      "Type":"C_TYPE_CERTIFICATE"
   },
   "Node":"selected_node"
}
```


---

# 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://circular-protocol.gitbook.io/circular-protocol-documentation/developer-tools/enterprise-apis/node.js/cep_account.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.
