<p>Raw blocks are available at <code>datafolder/block/blkXXXXX.dat</code> in <a href="https://en.bitcoin.it/wiki/Protocol_specification#block" rel="nofollow">serialized in network format</a> or can be downloaded from the p2p network.</p>

<p>As you can see in the format, each block has a list of transactions which in turn has a list of outputs. If you sum each output value, you get the <strong>output total</strong>.</p>

<p>The <strong>estimated transaction volume</strong> is calculated like the output total, but not counting the change outputs. There's no reliable way to know which output is being sent and which one is change, so you'll have to guess, take the mean or something like that.</p>

<p>One of these transactions must be coinbase. A coinbase transaction has a single input with <code>txid = 0000000000000000000000000000000000000000000000000000000000000000</code>. If you sum all input values (not including coinbase) and subtract all output values (again, not including coinbase) you get the <strong>total fees</strong>. Inputs don't have a <code>value</code>, so you have to find the transaction they're referring to (<code>txid</code>) in a previous block and the referenced output in that transaction (<code>vout</code>). There's a cheap (but not reliable) way to calculate the <strong>total fees</strong>. Just sum the coinbase outputs and subtract the block reward. The value is only accurate if the miner claimed the whole reward and fees (which is not enforced anywhere).</p>

<p>You might have noticed the <strong>relayed by</strong> is nowhere to be found. This is different for everyone, and is only the client which sent you the block for the first time. To know who relayed the block to you, you have to set a client listening for block broadcasts and just record whoever did broadcast the block to you.</p>

CC BY-SA 3.0
2014-01-14T14:43:33.067Z
2014-01-14T14:43:33.067Z
kaoD
<p>How to get these values?</p>

<ul>
<li>Output Total</li>
<li>Estimated Transaction Volume</li>
<li>Transaction Fees</li>
<li>Relayed by</li>
</ul>

<raw-data>
How to get full Block information like blockchain?
Gustavo Cortez
# How to get full Block information like blockchain?

(Asked by: username_0 on 2014-01-13)

How to get these values?

* Output Total
* Estimated Transaction Volume
* Transaction Fees
* Relayed by

**Tags:** raw-data


---

## 1 answers

### Answer by username_1 on 2014-01-14. Score: 1 | Accepted answer

Raw blocks are available at `datafolder/block/blkXXXXX.dat` in [serialized in network format](https://en.bitcoin.it/wiki/Protocol_specification#block) or can be downloaded from the p2p network.

As you can see in the format, each block has a list of transactions which in turn has a list of outputs. If you sum each output value, you get the **output total**.

The **estimated transaction volume** is calculated like the output total, but not counting the change outputs. There's no reliable way to know which output is being sent and which one is change, so you'll have to guess, take the mean or something like that.

One of these transactions must be coinbase. A coinbase transaction has a single input with `txid = 0000000000000000000000000000000000000000000000000000000000000000`. If you sum all input values (not including coinbase) and subtract all output values (again, not including coinbase) you get the **total fees**. Inputs don't have a `value`, so you have to find the transaction they're referring to (`txid`) in a previous block and the referenced output in that transaction (`vout`). There's a cheap (but not reliable) way to calculate the **total fees**. Just sum the coinbase outputs and subtract the block reward. The value is only accurate if the miner claimed the whole reward and fees (which is not enforced anywhere).

You might have noticed the **relayed by** is nowhere to be found. This is different for everyone, and is only the client which sent you the block for the first time. To know who relayed the block to you, you have to set a client listening for block broadcasts and just record whoever did broadcast the block to you.


---

