I have run bitcoind and have several accounts. How do I get the immature balance of one account using RPC calls (if possible) ?
2 Answers
Using the listtransactions
command, you can see your immature coinbase transactions listed with category immature
.
listtransactions
appears to include both spent and unspent transactions in general, but since immature coins cannot be spent, that shouldn't be a problem.
Since accounts are now deprecated, you can get the immature balance for the entire wallet with getwalletinfo
; look at the immature
field.
Note that getbalance
does not include immature coins.
With the getbalance command you can specify an account and minimum confirms, I'm assuming my immature balance you mean account balance containing unconfirmed transactions. By default it's at one.
getbalance [account] [minconf=1]
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list
-
3Usually "immature" means generated coins under 100 blocks deep in the blockchain. (I don't know if there's a way to get this in balance form from bitcoind) Commented Jan 2, 2014 at 5:02
-
Yes as @Luke-Jr says, I meant immature in that way, not transactions with low confirmations.– drcelusCommented Jan 3, 2014 at 12:40
-
Can someone point me to the code section in source tree, I am running some experiments and I would like to change the 100 block limit to 10 blocks for the same. Thanks Commented Nov 2, 2015 at 6:32