<p><strong><a href="https://code.google.com/p/bitcoinj/" rel="nofollow">BitCoinJ</a> is a Simplified Payment Verification (SPV) client library</strong></p>

<p>This means that it only downloads the headers for transactions, and only those that are relevant to the private keys contained in its wallet only. This greatly reduces the blockchain download (very quick to get started), but at the cost of not seeing all the other transactions (reduced overall network security).</p>

<p>So, in short, you can't download an arbitrary transaction through BitCoinJ.</p>

<p>However, to answer your requirement have you considered just using the <a href="http://blockchain.info/api" rel="nofollow">Blockchain.info API</a>?</p>

CC BY-SA 3.0
2016-02-21T14:03:38.297Z
Well how does then bitcoinj downloads relevant transaction from it's peers ?  Isn't it possible to ask peers to get particular transaction ?
Pavel Niedoba
CC BY-SA 3.0
2016-02-21T21:41:52.013Z
@PavelNiedoba Here's a link to more details on how SPV works: https://multibit.org/en/help/hd0.2/how-spv-works.html
Gary
CC BY-SA 3.0
2012-08-20T08:52:17.647Z
2012-08-20T08:52:17.647Z
Gary
<p>I am developing simple Bitcoin application using the bitcoinj library: The user enters the hash of a transaction and my application should return detailed information about that transaction. </p>

<p>How can I load that transaction? Is there a function like peer.getBlock() for transactions?</p>

<bitcoinj><java>
Load a transaction with bitcoinj
albertcoder
# Load a transaction with bitcoinj

(Asked by: username_0 on 2012-05-22)

I am developing simple Bitcoin application using the bitcoinj library: The user enters the hash of a transaction and my application should return detailed information about that transaction.

How can I load that transaction? Is there a function like peer.getBlock() for transactions?

**Tags:** bitcoinj, java


---

## 1 answers

### Answer by username_1 on 2012-08-20. Score: 2 | Accepted answer

**[BitCoinJ](https://code.google.com/p/bitcoinj/) is a Simplified Payment Verification (SPV) client library**

This means that it only downloads the headers for transactions, and only those that are relevant to the private keys contained in its wallet only. This greatly reduces the blockchain download (very quick to get started), but at the cost of not seeing all the other transactions (reduced overall network security).

So, in short, you can't download an arbitrary transaction through BitCoinJ.

However, to answer your requirement have you considered just using the [Blockchain.info API](http://blockchain.info/api)?

> **Comments:**
> **username_2**: Well how does then bitcoinj downloads relevant transaction from it's peers ?  Isn't it possible to ask peers to get particular transaction ?  
> **username_1**: @username_2 Here's a link to more details on how SPV works: https://multibit.org/en/help/hd0.2/how-spv-works.html  

---

