<p>According to <a href="https://bitcoin.stackexchange.com/questions/11875/how-to-access-any-transaction-detail-in-bitcoin-version-0-8-and-above">this thread</a> bitcoind does provide an interface to access the information you're looking for.</p>

CC BY-SA 3.0
2013-09-04T18:03:06.130Z
2013-09-04T18:03:06.130Z
2017-04-13T12:47:33.610Z
John Henry
<p>You need to run your node with <code>txindex=1</code> to enable the indexing of unspent outputs. </p>

CC BY-SA 3.0
2013-12-04T00:59:12.523Z
2013-12-04T00:59:12.523Z
Anonymous
<p>We are running bitcoind version v0.8.2-332-gf19eda1-beta.</p>

<p>Our goal is to parse all transactions in a given block.</p>

<p>To begin we call "bitcoind getblock ", which gives us a list of associated txid's.</p>

<p>We then call "bitcoind getrawtransaction " on each of these.</p>

<p>Unfortunately, getrawtransaction occasionally fails with:</p>

<p>error: {"code":-5,"message":"No information available about transaction"}</p>

<p>It is failing because the given transaction is not unspent, and the database which getrawtransactions relies on does not need to track such transactions.</p>

<p>This is explained in detail here on github:
<a href="https://github.com/bitcoin/bitcoin/issues/2077" rel="nofollow">https://github.com/bitcoin/bitcoin/issues/2077</a></p>

<p>"there is never need for more information than unspent transactions outputs, so that is the only piece of data that is kept"</p>

<p>Are we forced to parse the blockchain database which bitcoind maintains on disk ourselves?
Is there some way to extract the information we want through bitcoind?</p>

<p>Shouldn't bitcoind provide an interface to all blockchain information?
It recently changed its underlying database and may do so again.</p>

<bitcoind>
How can we access all transactions, including spent transactions, through bitcoind?
IHateBitcoin
# How can we access all transactions, including spent transactions, through bitcoind?

(Asked by: username_0 on 2013-09-02)

We are running bitcoind version v0.8.2-332-gf19eda1-beta.

Our goal is to parse all transactions in a given block.

To begin we call "bitcoind getblock ", which gives us a list of associated txid's.

We then call "bitcoind getrawtransaction " on each of these.

Unfortunately, getrawtransaction occasionally fails with:

error: {"code":-5,"message":"No information available about transaction"}

It is failing because the given transaction is not unspent, and the database which getrawtransactions relies on does not need to track such transactions.

This is explained in detail here on github:
<https://github.com/bitcoin/bitcoin/issues/2077>

"there is never need for more information than unspent transactions outputs, so that is the only piece of data that is kept"

Are we forced to parse the blockchain database which bitcoind maintains on disk ourselves?
Is there some way to extract the information we want through bitcoind?

Shouldn't bitcoind provide an interface to all blockchain information?
It recently changed its underlying database and may do so again.

**Tags:** bitcoind


---

## 2 answers

### Answer by username_1 on 2013-09-04. Score: 0

According to [this thread](https://bitcoin.stackexchange.com/questions/11875/how-to-access-any-transaction-detail-in-bitcoin-version-0-8-and-above) bitcoind does provide an interface to access the information you're looking for.


---

### Answer by username_2 on 2013-12-04. Score: 0

You need to run your node with `txindex=1` to enable the indexing of unspent outputs.


---

