1

I am currently calculating the balance of addresses from "listunspent"

$unspends = $btc->listunspent(6, 9999999, array($PARAMS['address']))['amount']

But I don't think this is the correct way. Does bitcoin-cli not have a native way to get this amount?

  • 2
    Does this answer your question? [How can I get address's balance that doesn't belong to my Bitcoin core wallet?](https://bitcoin.stackexchange.com/questions/99287/how-can-i-get-addresss-balance-that-doesnt-belong-to-my-bitcoin-core-wallet) –  Dec 25 '21 at 22:25
  • I voted to close as duplicate because it is easy and I have seen this before. Let me know if this does not work. –  Dec 25 '21 at 22:26
  • My question would be exactly if there is a more correct way to do this than using these two functions (one of them being experimental), because it doesn't seem so correct to do this way to obtain the amount of an address. – Jean Kássio Dec 26 '21 at 04:00

0 Answers0