How to get difficulty for Bitcoin and other coins

0

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?

tpe

Posted 2014-02-09T10:54:46.310

Reputation: 3

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 2014-02-09T12:44:45.703

Answers

3

Bitcoins as well as all of the altcoins that I know of have their own API. For example here is bitcoins API. 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 installed, you could then just type in the terminal

bitcoind getdifficulty

Loourr

Posted 2014-02-09T10:54:46.310

Reputation: 3 022

1getinfo and getmininginfo also return current difficultyMark 2014-02-09T19:45:20.343

This commands show LAST block difficulty, don't show real time DIFFBoli 2017-10-25T17:12:25.650