Oddbean new post about | logout
 purrhaps you already found the answer, but balance of satoshis can help you with that:

https://github.com/alexbosworth/balanceofsatoshis