So this is an exercise for fun as we know the block reward already.

But how would you get the bitcoind to show the block reward for the next block?

There is no bitcoind getblockreward but is there a way to discover the block reward from the commands available in bitcoind.

1 Answer 1


With getblockcount you can get the height of the latest block. Then the reward of the next block is 50 / 2 ^ Floor ((blockcount+1)/210000). In some programming environments 5000000000>>((blockcount+1)/210000) will give the desired result in satoshis.

  • This works as we know the total coins. But going outside the scope of Bitcoin, what if we didn't know the total coins like Freicoin and the reward decreases over time. Dec 25, 2012 at 14:05
  • @Bushstar: I don't know how to answer the general question. (I'm not sure if this information is explicitly available in the coinbase tx data, and even if so, the gettransaction call seems to work only for txs in the wallet). I'm not even sure if it's meaningful - an alt might have a completely different notion of block reward or a different API, so you can't devise a coin-agnostic procedure. And if it's just Bitcoin, the above applies. Dec 25, 2012 at 20:55

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.