<p>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.</p>

CC BY-SA 3.0
2012-12-25T14:05:17.573Z
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
CC BY-SA 3.0
2012-12-25T20:55:50.267Z
@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
CC BY-SA 3.0
2012-12-25T13:55:04.237Z
2012-12-25T13:55:04.237Z
Meni Rosenfeld
<p>So this is an exercise for fun as we know the block reward already.</p>

<p>But how would you get the bitcoind to show the block reward for the next block?</p>

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

<bitcoind>
Check block reward
Peter Bushnell
# Check block reward

(Asked by: username_0 on 2012-12-25)

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.

**Tags:** bitcoind


---

## 1 answers

### Answer by username_1 on 2012-12-25. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: 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.  
> **username_1**: @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.  

---

