Author

Topic: [ANN] CryptoHits PriceList API - www.CryptoHits.info (Read 382 times)

newbie
Activity: 43
Merit: 0
www.CryptoHits.info CryptoCurrency Price List v0.5.5 Beta

This script is currently in development. Its aim was to grab the BitCoin Price from the worlds former leading BitCoin Exchange, MtGox, (As of v0.5 we are now using BitStamp for the price of BTC), Then determine the price of the countless cryptocurrency alternatives to BitCoin from Crytpsy. Then using the price from BitStamp and the price from Cryptsy calculate the price in USD for all cryptocurrencies. In later versions this script started grabbing the LiteCoin price from BTC-E and making similar conversions for coins with LTC markets on Crytpsy. As of v0.3 the update timer for all prices is set to 10 minutes.
--
Basic Usage - USD price of BTC

Assumes you have a cURL function and $today is defined as follows

Code:
$today = date("m-d-y");
function cURL($href,$posts = "") { .. }

$CryptoHits = cURL("http://cryptohits.info/mtgox". $today .".rate");
$pos = strpos($CryptoHits,'0.0');
$btcusd = trim(substr($CryptoHits,$pos,10)," ");

Other examples

Price of USD price of LTC

Code:
$CryptoHits = cURL("http://cryptohits.info/btce". $today .".rate");

Price of LTC in BTC
Code:
$CryptoHits = cURL("http://cryptohits.info/LTCbtc". $today .".rate");

Price of DOGE in BTC

Code:
$CryptoHits = cURL("http://cryptohits.info/DOGEbtc". $today .".rate");

Price of DOGE in LTC

Code:
$CryptoHits = cURL("http://cryptohits.info/DOGEltc". $today .".rate");
Jump to: