CryptoCoinCharts API

We are providing a simple API for some of our data for you. You are able to use this data wherever you want for free. As we provide this data for free please dont abuse the API by sending big traffic to it (or by feeding a competitor website with it ;) !

API Wrappers

There is already one available wrapper for the cryptocoincharts API

List coins

Use this function to list all coins with their data which are available on cryptocoincharts.

PHP example

	// fetch data
	$curl = curl_init();
	curl_setopt($curl, CURLOPT_URL, "http://api.cryptocoincharts.info/listCoins");
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
	$rawData = curl_exec($curl);
	curl_close($curl);
	
	// decode to array
	$data = json_decode($rawData);
	
	// show data
	echo "<pre>";
	foreach ($data as $row) echo $row->id." - ".$row->name."\n";
	echo "</pre>";

One Trading pair - Ticker

Use this function to query price and volume data for ONE trading pairs.

PHP example

	// define pairs
	$pair = "ltc_usd";

	// fetch data
	$curl = curl_init();
	curl_setopt($curl, CURLOPT_URL, "http://api.cryptocoincharts.info/tradingPair/".$pair);
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
	$rawData = curl_exec($curl);
	curl_close($curl);
	
	// decode to array
	$data = json_decode($rawData);
	
	// show data
	echo "<pre>";
	echo "Price of ".$data->id.": ".$data->price."\n";
	echo "Trade this pair on ".$data->best_market."\n";
	echo "</pre>";

Many Trading pairs - Ticker

Use this function to query price and volume data for MANY trading pairs.

PHP example

	// define pairs
	$post = array("pairs" => "ltc_usd,ppc_btc");

	// fetch data
	$curl = curl_init();
	curl_setopt($curl, CURLOPT_URL, "http://api.cryptocoincharts.info/tradingPairs");
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($curl, CURLOPT_POST, true);
	curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
	$rawData = curl_exec($curl);
	curl_close($curl);
	
	// decode to array
	$data = json_decode($rawData);
	
	// show data
	echo "<pre>";
	foreach ($data as $row)
	{
		echo "Price of ".$row->id.": ".$row->price."\n";
		echo "Trade this pair on ".$row->best_market."\n";
	}
	echo "</pre>";