commit
9b091def60
@ -48,6 +48,8 @@ class Tools extends Base {
|
|||||||
return 'coinchose';
|
return 'coinchose';
|
||||||
} else if (preg_match('/btc-e.com/', $url)) {
|
} else if (preg_match('/btc-e.com/', $url)) {
|
||||||
return 'btce';
|
return 'btce';
|
||||||
|
} else if (preg_match('/cryptsy.com/', $url)) {
|
||||||
|
return 'cryptsy';
|
||||||
}
|
}
|
||||||
$this->setErrorMessage("API URL unknown");
|
$this->setErrorMessage("API URL unknown");
|
||||||
return false;
|
return false;
|
||||||
@ -73,6 +75,9 @@ class Tools extends Base {
|
|||||||
case 'btce':
|
case 'btce':
|
||||||
return $aData['ticker']['last'];
|
return $aData['ticker']['last'];
|
||||||
break;
|
break;
|
||||||
|
case 'cryptsy':
|
||||||
|
return $aData['return']['markets'][$strCurrency]['lasttradeprice'];
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// Catchall, we have no data extractor for this API url
|
// Catchall, we have no data extractor for this API url
|
||||||
$this->setErrorMessage("Undefined API to getPrice() on URL " . $this->config['price']['url']);
|
$this->setErrorMessage("Undefined API to getPrice() on URL " . $this->config['price']['url']);
|
||||||
|
|||||||
@ -73,6 +73,11 @@ $config['wallet']['password'] = 'testnet';
|
|||||||
* url = `http://www.coinchoose.com`
|
* url = `http://www.coinchoose.com`
|
||||||
* target = `/api.php`
|
* target = `/api.php`
|
||||||
* currency = `BTC`
|
* currency = `BTC`
|
||||||
|
*
|
||||||
|
* Optional (cryptsy.com):
|
||||||
|
* url = `https://www.cryptsy.com`
|
||||||
|
* target = `/api.php?method=marketdata`
|
||||||
|
* currency = `BTC`
|
||||||
**/
|
**/
|
||||||
$config['price']['url'] = 'https://btc-e.com';
|
$config['price']['url'] = 'https://btc-e.com';
|
||||||
$config['price']['target'] = '/api/2/ltc_usd/ticker';
|
$config['price']['target'] = '/api/2/ltc_usd/ticker';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user