Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

See foreign bitcoin transactions

Tags:

bitcoin

I'm trying to get a transaction info using

bitcoind gettransaction \
  9962d5c704ec27243364cbe9d384808feeac1c15c35ac790dffd1e929829b271

but I'm receiving

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

How to see a transaction using bitcoin API?

like image 337
asv Avatar asked Jan 04 '12 22:01

asv


People also ask

Can you track someones Bitcoin transactions?

Bitcoin transactions are traceable because Bitcoin's blockchain is completely transparent and every transaction is publicly stored on a distributed ledger.

Can you track all crypto transactions?

Cryptocurrency portfolio tracker allows you to track the total amount and value of your cryptocurrencies across all wallets, exchanges, platforms, and blockchains in real-time. These apps let you track historic transactions, their worth, and destinations or sources.

Will the IRS know if I don't report crypto?

If, after the deadline to report and any extensions have passed, you still have not properly reported your crypto gains on Form 8938, you can face additional fines and penalties. After an initial failure to file, the IRS will notify any taxpayer who hasn't completed their annual return or reports.

Can the US government track Bitcoin?

While every exchange of cryptocurrency is not currently tracked, it is a matter of time before more regulations impact the anonymity of crypto trading.


2 Answers

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)

After you've indexed a few blocks you can use something like this:

$ 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

See this for more.

like image 54
Rich Apodaca Avatar answered Nov 04 '22 01:11

Rich Apodaca


getrawtransaction <txid> command gets any transaction even from Bitcoin-qt client

Raw Transactions

The "raw transaction API" was introduced with Bitcoin-Qt/bitcoind version 0.7. It gives developers or very sophisticated end-users low-level access to transaction creation and broadcast.

This will return hexadecimal string of bytes, which is not very useful. But if you type

getrawtransaction <txid> 1

you'll get nicely formatted JSON representation

like image 42
Dmytro Sandu Avatar answered Nov 04 '22 02:11

Dmytro Sandu