How to get full Block information like blockchain? How to get these values?


Output Total
Estimated Transaction Volume
Transaction Fees
Relayed by
Raw blocks are available at datafolder/block/blkXXXXX.dat in serialized in network format 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.