1

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/

0

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”.

3
  • That's incorrect, getrawtransaction doesn't require transactions to have unspent outputs, if txindex=1 is enabled. For example, chainquery.com/bitcoin-api/getrawtransaction/… works, although the transaction has no unspent outputs.
    – MCCCS
    Aug 28 '18 at 10:17
  • 1
    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! Aug 28 '18 at 11:48
  • You're welcome! Glad if I helped.
    – MCCCS
    Aug 28 '18 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.