Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
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. – Peter Bushnell Dec 25 '12 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. – Meni Rosenfeld Dec 25 '12 at 20:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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