\[solved\] General FTC API help \* Feathercoin API help
-
Hello everyone I’m in the process of making an Android Feathercoin app and I’m using the Feathercoin API’s to pull some stats.
I would appreciate if someone could sow me how to set up the average hash rate over last 60 blocks using this API [url=http://explorer.feathercoin.com/q/getnetworkhash]http://explorer.feathercoin.com/q/getnetworkhash[/url] as I don’t know how to set it up :(
Also how can I set up “block until retarget / retarget block” and “expected time per block / until retarget” I don’t know if you guys use a API of some sort or manually work out the values.
Any help would be much appreciated! If I find out everything I need then the app should be available on Android Market today 8)
-
Format it like the following.
http://explorer.feathercoin.com/chain/Feathercoin/q/getnetworkhash/1/-60/json
-
Okay thanks, there are some lines where there is “infinity” what do I do about that? How do I work out the speed? Add them all together and divide by 60?
Or can I just use this:
http://explorer.feathercoin.com/chain/Feathercoin/q/getnetworkhash/60/-60/json -
[quote name=“Markus1337” post=“17405” timestamp=“1372092973”]
Okay thanks, there are some lines where there is “infinity” what do I do about that? How do I work out the speed? Add them all together and divide by 60?Or can I just use this:
http://explorer.feathercoin.com/chain/Feathercoin/q/getnetworkhash/60/-60/json
[/quote]your command gets (from the last 60, only 1 data point).
You will need to take the 60 from the previous one, validate that the number is a valid number), and turn that into the hashrate. I do not have my notes on that in front of me, but essentially take the average, and from that, plug it into the hashrate formula (something like H = h / t)
-
[quote name=“thep33t” post=“17422” timestamp=“1372099535”]
[quote author=Markus1337 link=topic=2191.msg17405#msg17405 date=1372092973]
Okay thanks, there are some lines where there is “infinity” what do I do about that? How do I work out the speed? Add them all together and divide by 60?Or can I just use this:
http://explorer.feathercoin.com/chain/Feathercoin/q/getnetworkhash/60/-60/json
[/quote]your command gets (from the last 60, only 1 data point).
You will need to take the 60 from the previous one, validate that the number is a valid number), and turn that into the hashrate. I do not have my notes on that in front of me, but essentially take the average, and from that, plug it into the hashrate formula (something like H = h / t)
[/quote]Will look into that, thank you for your help :)