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?

3
  • 2
    Does this answer your question? How can I get address's balance that doesn't belong to my Bitcoin core wallet?
    – user103136
    Dec 25, 2021 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.
    – user103136
    Dec 25, 2021 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. Dec 26, 2021 at 4:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.