How can I get a list of all the wallet transactions

+1 vote


I am using v1.0 beta 2

When I run the getwalletinfo command it reports:

  • txcount: 135
  • utxocount: 8

When I run listwallettransactions with argument:

  • count set to 999

it returns an array of 12 objects

Also when I run listaddresstransactions with arguments:

  • address set to 1BmN37RXibFqxUZkVSVyPN1AmGrepatYmAjs2E (wallet address)
  • count set to 999

it returns the same array of 12 objects.

Of course, I was expecting the total reported by the getwalletinfo.

Please clarify and advice the correct method(s) to retrieve all the wallet's transactions.


asked Sep 13, 2017 by WRM

1 Answer

0 votes

The two meanings of the word "wallet" are causing some confusion here, and we should think about making it clearer.

The "wallet" referred to by getwalletinfo is the internal database of transactions which are stored by the node. This includes transactions which involve one of the node's addresses, but also all transactions relating to assets or streams that the node is subscribed to.

By contrast, the "wallet" as accessed by listwallettransactions and listaddresstransactions only includes transactions which involve one of the node's addresses.

Does that explain the discrepancy?

answered Sep 13, 2017 by MultiChain
Just one further clarification....

Regarding your statement "...listaddresstransactions only includes transactions which involve one of the node's addresses"

If, for example, the node have five (5) addresses (ismine: true)...will listaddresstransactions return ALL the transactions for all five (5) of the addresses?

If it is "one of the five (5) addresses", is it the address for the node?
The listaddresstransactions API will only return transactions for the address specified as a parameter to the API call. It can also work with watch-only addresses (ismine: false).
I fully understand.