<p>Use <code>Wallet.getTransactions(boolean)</code>. This returns a <code>Set&lt;Transaction&gt;</code>:</p>

<pre><code>boolean includeDeadTransactions = true;
Set&lt;Transaction&gt; transactions = wallet.getTransactions(includeDeadTransactions);

for (Transaction t : transactions) {
    //Do something
}
</code></pre>

CC BY-SA 3.0
2016-02-23T01:35:27.733Z
Thanks, I have already found transaction hash map on wallet class, so i can get the list. BTW. now I'm trying to get list of change addresses which seems to be more difficult, because of protected and private access. Iwill create new question.
Pavel Niedoba
CC BY-SA 3.0
2016-02-23T01:28:20.363Z
2016-02-23T01:28:20.363Z
Ander Acosta
<p>simply use <code>wallet.getTransactionsByTime()</code> to get all transactions list of the bitcoin wallet in bitcoinj in Java (works well in bitcoinj 0.15.6).
Sample code: </p>

<pre><code>appKit = new WalletAppKit(params, new File("./wallet"), "client-testnet") {
    @Override
    protected List&lt;WalletExtension&gt; provideWalletExtensions() {
        return ImmutableList.&lt;WalletExtension&gt;of(new StoredPaymentChannelClientStates(wallet()));
            }
};          
appKit.wallet().getTransactionsByTime();
</code></pre>

CC BY-SA 4.0
2020-03-05T13:56:28.387Z
2020-03-05T13:56:28.387Z
Abhishek
<p>I configured bitcoinj library so I can connect to network, replay blockchain, create addresses, receive and send bitcoins. I using FullPrunedDatabase as block store. </p>

<p>I'm still missing how to find all transaction in this wallet. I'm also interested how to compute confirmed and unconfirmed balance on single address. I know this one was asked here before,<a href="https://bitcoin.stackexchange.com/questions/38947/how-to-get-balance-from-a-specific-address-in-bitcoinj">How to get balance from a specific address in bitcoinj?</a>, but I cannot figure out how to use CoinSelector</p>

CC BY-SA 3.0
2016-02-21T19:38:23.030Z
I found get wallet.getTransaction(hash) , but still missing get all ..
Pavel Niedoba
<bitcoinj>
How to get list of all transactions in bitcoinj wallet?
Pavel Niedoba
# How to get list of all transactions in bitcoinj wallet?

(Asked by: username_0 on 2016-02-21)

I configured bitcoinj library so I can connect to network, replay blockchain, create addresses, receive and send bitcoins. I using FullPrunedDatabase as block store.

I'm still missing how to find all transaction in this wallet. I'm also interested how to compute confirmed and unconfirmed balance on single address. I know this one was asked here before,[How to get balance from a specific address in bitcoinj?](https://bitcoin.stackexchange.com/questions/38947/how-to-get-balance-from-a-specific-address-in-bitcoinj), but I cannot figure out how to use CoinSelector

**Tags:** bitcoinj

> **Comments:**
> **username_0**: I found get wallet.getTransaction(hash) , but still missing get all ..  

---

## 2 answers

### Answer by username_1 on 2016-02-23. Score: 1

Use Wallet.getTransactions(boolean). This returns a Set:
boolean includeDeadTransactions = true;
Set transactions = wallet.getTransactions(includeDeadTransactions);

for (Transaction t : transactions) {
    //Do something
}

> **Comments:**
> **username_0**: Thanks, I have already found transaction hash map on wallet class, so i can get the list. BTW. now I'm trying to get list of change addresses which seems to be more difficult, because of protected and private access. Iwill create new question.  

---

### Answer by username_2 on 2020-03-05. Score: 0

simply use wallet.getTransactionsByTime() to get all transactions list of the bitcoin wallet in bitcoinj in Java (works well in bitcoinj 0.15.6).
Sample code: 
appKit = new WalletAppKit(params, new File("./wallet"), "client-testnet") {
    @Override
    protected List provideWalletExtensions() {
        return ImmutableList.of(new StoredPaymentChannelClientStates(wallet()));
            }
};          
appKit.wallet().getTransactionsByTime();


---

