<p>If I understand the question correctly, what you’re looking for is a “txindex=1” in your ‘bitcoin.conf’. It allows you to run ‘getrawtransaction’ to recall transactions that don’t spend from your wallet/don’t pay to your wallet/are not in the mempool. Furthermore, it’s named “Index transactions by TXID”.</p>

CC BY-SA 4.0
2018-08-28T10:17:10.647Z
That's incorrect, getrawtransaction doesn't require transactions to have unspent outputs, if txindex=1 is enabled. For example, http://chainquery.com/bitcoin-api/getrawtransaction/5119419d1bd6af11277d81443852f6e2ffb3bcaddf303335e60aa199ad7a5d36/0 works, although the transaction has no unspent outputs.
MCCCS
CC BY-SA 4.0
2018-08-28T11:48:59.540Z
Yes, sorry It was my mistake, I forgot reboot bitcoin core after change bitcoin.conf file to "txindex=1" and thought that I use new configuration. Thank you for your help!
Yarik Soltys
CC BY-SA 4.0
2018-08-28T09:44:03.573Z
2018-08-28T10:14:41.470Z
2018-08-28T10:14:41.470Z
MCCCS
<p>I use the RPC method <code>getrawtransaction</code> to get the whole info for a transaction. But if I understood right, it works only for transactions which contain at least one unspent output.</p>
<p>How can I get the whole info as provided by <code>getrawtransaction</code> for a transaction whose outputs are all spent. Or how does Blockcypher implement this?</p>
<p>For example this tx:
<a href="https://live.blockcypher.com/btc-testnet/tx/501553f8a27cfb8f661e9c977b923908642c1817ef6037eb104da8dfb892890a/" rel="nofollow noreferrer">https://live.blockcypher.com/btc-testnet/tx/501553f8a27cfb8f661e9c977b923908642c1817ef6037eb104da8dfb892890a/</a></p>

<bitcoin-core><transactions><json-rpc><txindex>
How can I get the whole info for a transaction whose outputs are spent?
Yarik Soltys
# How can I get the whole info for a transaction whose outputs are spent?

(Asked by: username_0 on 2018-08-28)

I use the RPC method `getrawtransaction` to get the whole info for a transaction. But if I understood right, it works only for transactions which contain at least one unspent output.

How can I get the whole info as provided by `getrawtransaction` for a transaction whose outputs are all spent. Or how does Blockcypher implement this?

For example this tx:
<https://live.blockcypher.com/btc-testnet/tx/501553f8a27cfb8f661e9c977b923908642c1817ef6037eb104da8dfb892890a/>

**Tags:** bitcoin-core, transactions, json-rpc, txindex


---

## 1 answers

### Answer by username_1 on 2018-08-28. Score: 1

If I understand the question correctly, what you’re looking for is a “txindex=1” in your ‘bitcoin.conf’. It allows you to run ‘getrawtransaction’ to recall transactions that don’t spend from your wallet/don’t pay to your wallet/are not in the mempool. Furthermore, it’s named “Index transactions by TXID”.

> **Comments:**
> **username_1**: That's incorrect, getrawtransaction doesn't require transactions to have unspent outputs, if txindex=1 is enabled. For example, http://chainquery.com/bitcoin-api/getrawtransaction/5119419d1bd6af11277d81443852f6e2ffb3bcaddf303335e60aa199ad7a5d36/0 works, although the transaction has no unspent outputs.  
> **username_0**: Yes, sorry It was my mistake, I forgot reboot bitcoin core after change bitcoin.conf file to "txindex=1" and thought that I use new configuration. Thank you for your help!  

---

