<p>Unless you're a miner you can't get that info. You can get the information of the last block but in order for the current you would have to mine it yourself and then win to be correct. </p>

CC BY-SA 4.0
2020-01-06T04:40:51.190Z
2020-01-06T04:40:51.190Z
Johnny Good
<p>With order.</p>

<p>The world mines multiple blocks at once, with only one block chosen by consensus to be kept.</p>

<p>If you want to get some information from bitcoin’s RPC you should consider using your own node.</p>

<p>You can call the RPC method <a href="https://bitcoincore.org/en/doc/0.19.0/rpc/mining/getmininginfo/" rel="nofollow noreferrer">getmininginfo</a> but this command might not return the mining information you are searching for (an example <em>Previous Block</em> is not correct).</p>

<p>With the following information you can have the following problem:</p>

<ul>
<li>Previous Block: The Previous Block is not equal to all networks at the same moment;</li>
<li>Merkle Root:  Every block can contain different transactions and in a different order</li>
</ul>

<p>And on your question of how you can use the library python-bitcoinrpc, you can see my Python3 script for one example. you can find the script <a href="https://gist.github.com/vincenzopalazzo/1f1245ab200ed59a0604dee134f42863" rel="nofollow noreferrer">here</a></p>

CC BY-SA 4.0
2019-12-05T17:22:17.800Z
Do you mean that there is more than one of these information?!
Prometheus
CC BY-SA 4.0
2019-12-05T20:26:51.837Z
No, I say, every miner can be mining the different block because the network peer-to-peer doesn't ensure the same information to all nodes. an example you have A, B, C mining nodes, if you create a transaction, the information of transaction can contain only in the C mem-pool and not in the A, B nodes. in conclusion you don't say "What is the block minend now" because the block mined could be more
vincenzopalazzo
CC BY-SA 4.0
2019-12-05T20:48:30.073Z
Well, How can I get information about node A for example?!!!
Prometheus
CC BY-SA 4.0
2019-12-05T21:01:44.550Z
The unique information can you get to the mining is contains inside the command RPC bitcoin form [this documentation](https://bitcoincore.org/en/doc/0.19.0/) in the section **Mining**
vincenzopalazzo
CC BY-SA 4.0
2019-12-05T13:13:47.177Z
2020-01-05T10:59:48.757Z
2020-01-05T10:59:48.757Z
vincenzopalazzo
<p>I want to know how through using this <a href="https://github.com/jgarzik/python-bitcoinrpc" rel="nofollow noreferrer">library</a> I can print information about the current block that the world mine right now and I mean by that: Version, Previous Block, Merkle Root, Time, Bits, and how many zeros we are looking for for the output of the hash.</p>

<blockchain>
How can I print these information using this library?
Prometheus
# How can I print these information using this library?

(Asked by: username_0 on 2019-12-05)

I want to know how through using this [library](https://github.com/jgarzik/python-bitcoinrpc) I can print information about the current block that the world mine right now and I mean by that: Version, Previous Block, Merkle Root, Time, Bits, and how many zeros we are looking for for the output of the hash.

**Tags:** blockchain


---

## 2 answers

### Answer by username_1 on 2020-01-06. Score: 1

Unless you're a miner you can't get that info. You can get the information of the last block but in order for the current you would have to mine it yourself and then win to be correct.


---

### Answer by username_2 on 2019-12-05. Score: 0

With order.

The world mines multiple blocks at once, with only one block chosen by consensus to be kept.

If you want to get some information from bitcoin’s RPC you should consider using your own node.

You can call the RPC method [getmininginfo](https://bitcoincore.org/en/doc/0.19.0/rpc/mining/getmininginfo/) but this command might not return the mining information you are searching for (an example *Previous Block* is not correct).

With the following information you can have the following problem:

* Previous Block: The Previous Block is not equal to all networks at the same moment;
* Merkle Root: Every block can contain different transactions and in a different order

And on your question of how you can use the library python-bitcoinrpc, you can see my Python3 script for one example. you can find the script [here](https://gist.github.com/username_2/1f1245ab200ed59a0604dee134f42863)

> **Comments:**
> **username_0**: Do you mean that there is more than one of these information?!  
> **username_2**: No, I say, every miner can be mining the different block because the network peer-to-peer doesn't ensure the same information to all nodes. an example you have A, B, C mining nodes, if you create a transaction, the information of transaction can contain only in the C mem-pool and not in the A, B nodes. in conclusion you don't say "What is the block minend now" because the block mined could be more  
> **username_0**: Well, How can I get information about node A for example?!!!  
> **username_2**: The unique information can you get to the mining is contains inside the command RPC bitcoin form [this documentation](https://bitcoincore.org/en/doc/0.19.0/) in the section **Mining**  

---

