api/status: add last 24h avg hashrate

This commit is contained in:
Tanguy Pruvot 2017-02-26 21:08:58 +01:00
parent 054e06faa5
commit 96c41abeff
3 changed files with 7 additions and 2 deletions

View file

@ -163,7 +163,7 @@ class CoinCommand extends CConsoleCommand
}
/**
* Compare getminininginfo difficulty and computed one (from the target hash)
* Extract/Compute the average block time of a block chain
*/
public function estimateBlockTime($symbol)
{

View file

@ -67,8 +67,12 @@ class ApiController extends CommonController
"estimate_current" => $price,
"estimate_last24h" => $avgprice,
"actual_last24h" => $btcmhday1,
"rental_current" => $rental,
"hashrate_last24h" => (double) $hashrate1,
);
if(YAAMP_RENTAL) {
$stat["rental_current"] = $rental;
}
$stats[$algo] = $stat;
}

View file

@ -68,6 +68,7 @@ result:
"estimate_current": "0.00053653",
"estimate_last24h": "0.00036408",
"actual_last24h": "0.00035620",
"hashrate_last24h": 269473000,
"rental_current": "3.61922463"
},