<p>When you start bitcoind just pass the <code>-txindex</code> flag in order to have it create the transaction index to be able to get any transaction by id:</p>



<pre><code>bitcoind -txindex
</code></pre>

<p>In the console, you can get any raw transaction by its transaction id (hash):</p>



<pre><code>bitcoin-cli getrawtransaction
15f7c2c57cce37d9b8927f957840ec9367bb504780347e497c758ee022b2a143

...
</code></pre>

CC BY-SA 4.0
2019-08-06T12:50:21.883Z
2019-08-06T13:13:10.607Z
2019-08-06T13:13:10.607Z
JBaczuk
<p>How used the getrawtransaction to find the tx blockchain?</p>

<p>inside the documentation says to use the -txindex, can you give me an example for the complete command please?</p>

<bitcoin-core><bitcoind>
How used the getrawtransaction for fin the tx blockchain
vincenzopalazzo
# How used the getrawtransaction for fin the tx blockchain

(Asked by: username_0 on 2019-08-06)

How used the getrawtransaction to find the tx blockchain?

inside the documentation says to use the -txindex, can you give me an example for the complete command please?

**Tags:** bitcoin-core, bitcoind


---

## 1 answers

### Answer by username_1 on 2019-08-06. Score: 2 | Accepted answer

When you start bitcoind just pass the -txindex flag in order to have it create the transaction index to be able to get any transaction by id:
bitcoind -txindex

In the console, you can get any raw transaction by its transaction id (hash):
bitcoin-cli getrawtransaction
15f7c2c57cce37d9b8927f957840ec9367bb504780347e497c758ee022b2a143

...


---

