Author

Topic: listreceivedbyaddress vs listaddressgroupings (Read 167 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
~snip~

Can you try it again but this time add this setting on the Bitcoin.conf file

Code:
server=1

I already enable server when tried above command with bitcoin-cli (i also tried with console on Qt). Besides, if you don't enable server, you can't use bitcoin-cli.

Just reading their API calls here
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

I found in the description to use the bitcoind.

That wiki page is outdated, the page itself already warned you. Few command such as move no longer exist.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
Can you try this command below?

Code:
bitcoin-cli listreceivedbyaddress 0 true true '"replacethiswiththetargetaddress"'

Don't remove the quotes.

The format itself is invalid

Code:
error code: -4
error message:
address_filter parameter was invalid

I also tried different format, but it never return correct balance (always zero).

Code:
listreceivedbyaddress 0 true the_address
listreceivedbyaddress 0 true 'the_address'

I suspect the documentation/example usage for listreceivedbyaddress is very vague
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
~snip~

Can you try it again but this time add this setting on the Bitcoin.conf file

Code:
server=1

Then use the command again but this time with bitcoind

Code:
bitcoind listreceivedbyaddress 0 true

Just reading their API calls here
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

I found in the description to use the bitcoind.

Let see if it will work
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
Based on what I understand about listaddressgroupings the returning result must be the addresses with inputs or past transactions that exist on the mainnet blockchain meaning if you use this command and the target address doesn't have inputs or past transaction it won't show anything.

listaddressgroupings calculates the total number of BTC received by each wallet address and returns a list of addresses alongside its total balance. This struct is wrapped inside another array that lists every wallet address that has ever been involved in transactions with that address.



That's all there is to it. There isn't much "common ownership made public" or correlation stuff involved in this RPC (or else it would be prohibitively expensive to run on large wallets since it would be stateless information calculated at runtime).

legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
Have you read the bitcoin core documentation?

If not yet read them here
- https://developer.bitcoin.org/reference/rpc/index.html

About "listreceivedbyaddress" read this https://developer.bitcoin.org/reference/rpc/listreceivedbyaddress.html
According to documentation, it is "List balances by receiving address."


And for "listaddressgroupings" read them here https://developer.bitcoin.org/reference/rpc/listaddressgroupings.html
According to documentation about this command:
"Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions"

Based on what I understand about listaddressgroupings the returning result must be the addresses with inputs or past transactions that exist on the mainnet blockchain meaning if you use this command and the target address doesn't have inputs or past transaction it won't show anything.

For listreceivedbyaddress I think it only shows the total amount received of the target address and shows the confirmations of the recent transaction.
I got this on "listreceivedbyaddress"


I don't know if it's a bug, but i tried same thing on regtest using Bitcoin Core 0.21.1. But command listreceivedbyaddress never shows correct amount even if i use different parameter

Code:
listreceivedbyaddress
listreceivedbyaddress 0
listreceivedbyaddress 0 true
listreceivedbyaddress 0 true "the_address"

Can you try this command below?

Code:
bitcoin-cli listreceivedbyaddress 0 true true '"replacethiswiththetargetaddress"'

Don't remove the quotes.
newbie
Activity: 9
Merit: 1
hi, i am an amateur in blockchain, So forgive me for the trivial questions

I want to know the difference between listreceivedbyaddress and listaddressgroupings method in the bitcoin-cli?

it is wired after call this: bitcoin-cli -regtest generatetoaddress 101 $(bitcoin-cli -regtest getnewaddress)

with listaddressgroupings i have 50 bitcoin, but with listreceivedbyaddress i have zero (by same address)
Jump to: