How to see bitcoin transaction info

0 votes

I want to see foreign bitcoin transaction info and I am using this following code:

bitcoind gettransaction \

  9962d5c704ec27243364cbe9d384808feeac1c15c35ac790dffd1e929829b271

But when I run this, I get the following result:

error: {"code":-5,"message":"Invalid or non-wallet transaction id"}

Please help.

Aug 17, 2018 in Blockchain by slayer
• 29,310 points
985 views

1 answer to this question.

0 votes

You can view foreign transactions using bitcoind.

  1. Set txindex=1 in your bitcoin.conf file.
  2. restart bitcoind with -reindex (you need to re-build your entire index)

Next, run the following code:

$ bitcoind getblockcount

122735


$ bitcoind getblockhash 67543

0000000004e213266ccd388df12896412c1a70e647b48004f7d6894b9d6f63b9


$ bitcoind getblock 0000000004e213266ccd388df12896412c1a70e647b48004f7d6894b9d6f63b9

// JSON containing tx "a93a668d9332e21d51380c7251bbf5ad47295ca9795e0ad6f2fe8d63b76af9aa"


$ bitcoind getrawtransaction a93a668d9332e21d51380c7251bbf5ad47295ca9795e0ad6f2fe8d63b76af9aa 1

// json of transaction - note that "1" at the end tells bitcoind to decode into json

For more information, visit: https://bitcoin.stackexchange.com/questions/11759/get-non-wallet-transactions-using-bitcoin-rpc-gettransaction

answered Aug 17, 2018 by digger
• 26,720 points

Related Questions In Blockchain

0 votes
1 answer

How to set fee in raw bitcoin transaction using btcutil

To answer your question, the settxfee is ...READ MORE

answered Mar 24 in Blockchain by Rahul
• 9,000 points
115 views
0 votes
1 answer

How to get sender bitcoin address from transaction ID?

 You can use any scripting language with ...READ MORE

answered Apr 12 in Blockchain by Rahul
• 9,000 points
349 views
+1 vote
1 answer

How does a miner get to know that a transaction is verified by all the nodes?

Contrary to the popular belief, it is ...READ MORE

answered Mar 27, 2018 in Blockchain by Johnathon
• 9,090 points
1,693 views
+1 vote
1 answer

Hyperledger - How can I use transaction certificates to enforce privacy?

The transaction certificates don't actually address privacy ...READ MORE

answered Apr 17, 2018 in Blockchain by Perry
• 17,100 points
431 views
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,440 points
649 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,007 views
0 votes
1 answer
0 votes
1 answer

How i can use nodejs to watch transactions in bitcoin network?

you can use  const Socket = require('blockchain.info/Socket'); const mySocket ...READ MORE

answered Jul 9, 2018 in Blockchain by digger
• 26,720 points
578 views
0 votes
1 answer

How to extract h160 address of bitcoin blockchain?

You can extract the data using the ...READ MORE

answered Jul 16, 2018 in Blockchain by digger
• 26,720 points
1,557 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP