<p>You can pass the output of <code>listtransactions</code> through a JSON parser which can get that information for you. You can install a command line tool like <a href="https://stedolan.github.io/jq/" rel="nofollow noreferrer"><code>jq</code></a> and pipe the output of your commands to it so you can access the JSON fields that you want.</p>

CC BY-SA 3.0
2017-10-04T07:26:39.610Z
This is what I want to avoid to do as I wrote in my question. I want to implement pagination, we have about 100 000 transactions in the wallet, fetching them all is slow. More over I use Java not JavaScript. Parsing JSON is not problem
Pavel Niedoba
CC BY-SA 3.0
2017-10-04T03:56:23.140Z
2017-10-04T03:56:23.140Z
Ava Chow
<p>I'm trying to implement paginations using :</p>

<pre><code>https://chainquery.com/bitcoin-api/listtransactions
</code></pre>

<p>I want to have reverse listing (oldest first), so I need to get total number of transaction returned by listtransactions call. </p>

<p>I know that getwalletinfo returns number of transactions, but listtransactions returns transaction outputs, which are more if sendmany is used. </p>

<p>Is there any method to get listtransactions.length without fetching all transaction in the wallet ?</p>

<bitcoind><json-rpc>
How to get total number of transactions from bitcoin core wallet using rpc
Pavel Niedoba
# How to get total number of transactions from bitcoin core wallet using rpc

(Asked by: username_0 on 2017-10-03)

I'm trying to implement paginations using :

```
https://chainquery.com/bitcoin-api/listtransactions

```

I want to have reverse listing (oldest first), so I need to get total number of transaction returned by listtransactions call.

I know that getwalletinfo returns number of transactions, but listtransactions returns transaction outputs, which are more if sendmany is used.

Is there any method to get listtransactions.length without fetching all transaction in the wallet ?

**Tags:** bitcoind, json-rpc


---

## 1 answers

### Answer by username_1 on 2017-10-04. Score: 0

You can pass the output of `listtransactions` through a JSON parser which can get that information for you. You can install a command line tool like [`jq`](https://stedolan.github.io/jq/) and pipe the output of your commands to it so you can access the JSON fields that you want.

> **Comments:**
> **username_0**: This is what I want to avoid to do as I wrote in my question. I want to implement pagination, we have about 100 000 transactions in the wallet, fetching them all is slow. More over I use Java not JavaScript. Parsing JSON is not problem  

---

