Author

Topic: java api to find bitcoin difficulty? (Read 1411 times)

full member
Activity: 142
Merit: 100
Hive/Ethereum
August 29, 2013, 09:52:09 AM
#4
You may not be able to grab every stat (such as historical network difficulty) with just bitcoind.

Here's a full list of bitcoind API calls
hero member
Activity: 1316
Merit: 503
Someone is sitting in the shade today...
August 29, 2013, 09:39:34 AM
#3
Your best bet is probably to use a service such at blockchain.info to gather stats. You'll have to make an HTTP request and parse the result with some JSON module.

If you do ever want to interact with the mainline client directly, it's easily as simple, because bitcoind support a JSON-RPC interface. The wiki even has Java-specific information.

hi thanks for the response, yes i am looking for a direct connection to the p2p network not via a third party. For example how does blockchain.info get its stats?  I can code the api myself in java but just confused as to how to go about getting stats on the network, dont want to have a dependency on a third party website (third party api jar files are ok but i cant find any).

for example

public static long getCurrentDifficulty()
{
//what are some of the high level steps i have to do?
}
full member
Activity: 142
Merit: 100
Hive/Ethereum
August 29, 2013, 01:49:16 AM
#2
Your best bet is probably to use a service such at blockchain.info to gather stats. You'll have to make an HTTP request and parse the result with some JSON module.

If you do ever want to interact with the mainline client directly, it's easily as simple, because bitcoind support a JSON-RPC interface. The wiki even has Java-specific information.
hero member
Activity: 1316
Merit: 503
Someone is sitting in the shade today...
August 28, 2013, 08:37:12 PM
#1
Hi have a newbie question, how do i use java to find the current bitcoin network difficulty and past difficulties etc..?  I looked at bitcoinj but that's mostly for wallet sending/receiving i believe.  I dont need wallet or security, just want a way to get stats about the network using java.

Can someone point me in the right direction on the api/packages that's available or how to do that.  thanks
Jump to: