<p>Bitcoins as well as all of the altcoins that I know of have their own API. For example here is <a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list" rel="nofollow">bitcoins API</a>. It has a method called <code>getdifficulty</code> which </p>

<blockquote>
  <p>Returns the proof-of-work difficulty as a multiple of the minimum difficulty.</p>
</blockquote>

<p>So if you had <a href="https://en.bitcoin.it/wiki/Bitcoind" rel="nofollow">bitcoind</a> installed, you could then just type in the terminal </p>

<pre><code>bitcoind getdifficulty
</code></pre>

CC BY-SA 3.0
2014-02-09T19:45:20.343Z
getinfo and getmininginfo also return current difficulty
Mark
CC BY-SA 3.0
2017-10-25T17:12:25.650Z
This commands show LAST block difficulty, don't show real time DIFF
Boli
CC BY-SA 3.0
2014-02-09T16:26:10.623Z
2014-02-09T16:26:10.623Z
Loourr
<p>How do I get access to the latest Bitcoin/Altcoin difficulties from the original "source/network"? I want to develop a C#/.NET application that collect this information.</p>

<p>I know that there are web sites that provide information about Bitcoin and Altcoin difficulty. Coinchoose and Coinwarz provides JSON APIs for example. There are also blockexporers like <a href="http://blockexplorer.com/q/nethash/2016" rel="nofollow">http://blockexplorer.com/q/nethash/2016</a> that could give me the current Bitcoin difficulty.</p>

<p>The problem with Coinchoose and Coinwarz is that they are not complete, not fully real-time and Coinwarz cost money in addition to that. The block explorer above is for Bitcoin only. Are there block explorers for all AltCoins as well? And are they all providing different API's?</p>

<p>There must be some "original source", like the mining network or similar, where you can connect and get this information in real-time? Or is that also completely different for each coin? I understand that each coin has its own mining network, but are they different except having different IP-addresses for example?</p>

<p>So the question is basically how do I get access to real-time coin difficulty information for Bitcoins and all other coins - not from an existing web site, but more on the API / programming level?</p>

CC BY-SA 3.0
2014-02-09T12:44:45.703Z
I guess you could take out the original C++ code of each coin (will be 99% the same on them all) that listens on the network for new blocks, drop everything but the part that gets the block number and the target difficulty, then convert to C#...
Joe Pineda
<development><difficulty><altcoin>
How to get difficulty for Bitcoin and other coins
tpe
# How to get difficulty for Bitcoin and other coins

(Asked by: username_0 on 2014-02-09)

How do I get access to the latest Bitcoin/Altcoin difficulties from the original "source/network"? I want to develop a C#/.NET application that collect this information.

I know that there are web sites that provide information about Bitcoin and Altcoin difficulty. Coinchoose and Coinwarz provides JSON APIs for example. There are also blockexporers like <http://blockexplorer.com/q/nethash/2016> that could give me the current Bitcoin difficulty.

The problem with Coinchoose and Coinwarz is that they are not complete, not fully real-time and Coinwarz cost money in addition to that. The block explorer above is for Bitcoin only. Are there block explorers for all AltCoins as well? And are they all providing different API's?

There must be some "original source", like the mining network or similar, where you can connect and get this information in real-time? Or is that also completely different for each coin? I understand that each coin has its own mining network, but are they different except having different IP-addresses for example?

So the question is basically how do I get access to real-time coin difficulty information for Bitcoins and all other coins - not from an existing web site, but more on the API / programming level?

**Tags:** development, difficulty, altcoin

> **Comments:**
> **username_1**: I guess you could take out the original C++ code of each coin (will be 99% the same on them all) that listens on the network for new blocks, drop everything but the part that gets the block number and the target difficulty, then convert to C#...  

---

## 1 answers

### Answer by username_2 on 2014-02-09. Score: 3 | Accepted answer

Bitcoins as well as all of the altcoins that I know of have their own API. For example here is [bitcoins API](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list). It has a method called `getdifficulty` which

> Returns the proof-of-work difficulty as a multiple of the minimum difficulty.

So if you had [bitcoind](https://en.bitcoin.it/wiki/Bitcoind) installed, you could then just type in the terminal

```
bitcoind getdifficulty

```

> **Comments:**
> **username_3**: getinfo and getmininginfo also return current difficulty  
> **username_4**: This commands show LAST block difficulty, don't show real time DIFF  

---

