Awkard-ish notation of getbalance() #330
-
Hi guys, thank you for this project! I've sent 0.00006691 BTC to this address but when I run this code
I'd have guessed the output of getbalance() would have looked like what I see from clw, that is |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The getbalance() method returns the value in Satoshi's, the smallest denominator for Bitcoin. You can get the value in bitcoins by dividing by 100000000 or 10**8: >>> amount / 10**8
0.00006691 Or you could use bitcoinlib Value class to conveniently display values >>> from bitcoinlib.values import Value
>>> Value.from_satoshi(6691, 1).str()
'0.00006691 BTC' |
Beta Was this translation helpful? Give feedback.
The getbalance() method returns the value in Satoshi's, the smallest denominator for Bitcoin.
You can get the value in bitcoins by dividing by 100000000 or 10**8:
Or you could use bitcoinlib Value class to conveniently display values