Note: For privacy purposes, I'm using made-up amounts here for the most part.
0.0305 BTC in my wallet. I then made a transaction of
My Bitcoin Core GUI immediately started saying:
0.0205 BTC, but the RPC API says
When it's confirmed/settled, the RPC API goes back to saying the same thing as the GUI:
This confuses me. Why does it temporarily show a smaller number in the RPC API compared to the GUI? If it has to do with the transaction fee, why does this not reflect in the GUI?
The "pending" amount in the GUI says
0.00000000 BTC, so it's not like that explains it either. It's not taking the "pending" amount into consideration in the API response. I use
getbalance to get it: https://bitcoincore.org/en/doc/0.21.0/rpc/wallet/getbalance/
The difference between the before/after 6 verifications sum is
0.0128 BTC. I don't know if that tells you anything or if it's fixed each time. It's certainly not the transaction fee. All I know is that I've noticed this every time I've made a transaction in the last year or so. (Note: I'm not saying that this is some "new thing" -- only that I've only noticed it for that long, probably because I barely used to pay attention at all to how many BTC I had when they were worth so little.)
What can explain this?