fetch last value from API instead of average
* Added curl as dependency in README
This commit is contained in:
parent
7e56f484e5
commit
bdc42c58c1
@ -36,6 +36,7 @@ in the appropriate forums.
|
||||
* PHP 5.4+
|
||||
* php5-mysqlnd
|
||||
* php5-memcached
|
||||
* php5-curl
|
||||
* MySQL Server
|
||||
* mysql-server
|
||||
* memcached
|
||||
|
||||
@ -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");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user