fetch last value from API instead of average

* Added curl as dependency in README
This commit is contained in:
Sebastian Grewe 2013-05-29 20:54:34 +02:00
parent 7e56f484e5
commit bdc42c58c1
2 changed files with 2 additions and 1 deletions

View File

@ -36,6 +36,7 @@ in the appropriate forums.
* PHP 5.4+
* php5-mysqlnd
* php5-memcached
* php5-curl
* MySQL Server
* mysql-server
* memcached

View File

@ -27,7 +27,7 @@ require_once(BASEPATH . CLASS_DIR . '/tools.class.php');
verbose("Running ticket updates\n");
if ($aData = $tools->getApi($config['price']['url'], $config['price']['target'])) {
if (!$setting->setValue('price', $aData['ticker']['avg']))
if (!$setting->setValue('price', $aData['ticker']['last']))
verbose("ERR Table update failed");
} else {
verbose("ERR Failed download JSON data from " . $config['price']['url'].$config['price']['target'] . "\n");