I need help. I have createrawtransaction as per the screenshot but then, unable to signrawtransactionwithkey, I have insert WIF Private Key and it state that "Input not found or already spent" - how do I overcome this?

Your thoughts?


You're trying to spend a 25.04826416 BTC output that was created by mining in May 2015, which was spent a few days after its creation: https://blockstream.info/tx/45fd1c838a56798fe027f61bdfdab83845399175a3b9cced397c5a38e669bb49?input:14

Even if you have the private key for the address that output used at the time, the coin can't be spent again.

I don't know what you're trying to do - but spending the same coin twice isn't allowed.

  • thanks for your feedback and checked on my behalf. First of all, that TxID was generated when I run the Blockhash in Console (Bitcoin Core), which is why I use that TxID to createrawtransaction in the first place. Well, I really have No Idea that it was created and spent on May 2015, maybe because of this, that my Bitcoin Core was still "running to connect" with peers it stated here that "Last Block Time: Fri May 8 00:29:33 2015 - I gues that explains why. How should I know what happen to this Txid in the past? But then, really thanks to you. – Jsim Sep 15 '20 at 4:46

The transaction id you mentioned in the createrawtransaction command either has no vout:1 or it has been spent already.

I used vout:0from below transaction:


Example of one transaction that I created using createrawtransaction, signed using signrawtransactionwithkey and broadcast using sendrawtransaction

createrawtransaction "[{\"txid\":\"65ff3fddafd8d26ac07c55fc41a756907833931f193f68cbe7accc73968dfc58\",\"vout\":0}]" "[{\"tb1qs20zm08kkle3hjfkxwt37u0k76umt7y7qty9ej\":0.01}]"


dumpprivkey tb1qe20856qrx8rn87glzlutaty55hn4dvfppvnncj


signrawtransactionwithkey "020000000158fc8d9673ccace7cb683f191f9333789056a741fc557cc06ad2d8afdd3fff650000000000ffffffff0140420f0000000000160014829e2dbcf6b7f31bc93633971f71f6f6b9b5f89e00000000" "[\"cTEcDRsomnC7ZYVmFNZZJyekfA6Jgd2JFkRCobm18pX2c3b5nquW\"]"

{ "hex": "0200000000010158fc8d9673ccace7cb683f191f9333789056a741fc557cc06ad2d8afdd3fff650000000000ffffffff0140420f0000000000160014829e2dbcf6b7f31bc93633971f71f6f6b9b5f89e024730440220055b4c16920af7648e3a5b127c83efd23bd07c9e749a7e1dce4c60a5f6f38d4d02204a35040f61b544f41dbfba98c383fc3c67b07567647d330b4f9d71efc49d0fc8012102855e51c5171032a68ba051cd5b09cc534ec9668b4af8824be02cbb84db93f62e00000000", "complete": true }

sendrawtransaction 0200000000010158fc8d9673ccace7cb683f191f9333789056a741fc557cc06ad2d8afdd3fff650000000000ffffffff0140420f0000000000160014829e2dbcf6b7f31bc93633971f71f6f6b9b5f89e024730440220055b4c16920af7648e3a5b127c83efd23bd07c9e749a7e1dce4c60a5f6f38d4d02204a35040f61b544f41dbfba98c383fc3c67b07567647d330b4f9d71efc49d0fc8012102855e51c5171032a68ba051cd5b09cc534ec9668b4af8824be02cbb84db93f62e00000000





This was a transaction on testnet so I didn't care about fees. You can use fundrawtransaction for fees.

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.