Author

Topic: Enter API Info (Read 1205 times)

legendary
Activity: 1596
Merit: 1005
https://cryptodatabase.net
March 13, 2015, 01:16:54 PM
#7
I just want to get it to show ANY information. That would be nice. WHERE DO I PLUG IN THE API INFORMATION? on that website there is this.
List coins
Use this function to list all coins with their data which are available on cryptocoincharts.

URL: GET http://api.cryptocoincharts.info/listCoins
RESULT: array with coins objects
id: coin ID
name: coin name
website: URL of website if available
price_btc: last traded price of best market
volume_btc: 24h trading volume recalculated to BTC
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 "
";
   foreach ($data as $row) echo $row->id." - ".$row->name."\n";
   echo "
";


Where do I put this URL: GET http://api.cryptocoincharts.info/listCoins

The example tells you. All of their examples are fully functioning code that you place tags around and place anywhere on a .php file.
newbie
Activity: 23
Merit: 0
March 13, 2015, 07:38:54 AM
#6
I just want to get it to show ANY information. That would be nice. WHERE DO I PLUG IN THE API INFORMATION? on that website there is this.
List coins
Use this function to list all coins with their data which are available on cryptocoincharts.

URL: GET http://api.cryptocoincharts.info/listCoins
RESULT: array with coins objects
id: coin ID
name: coin name
website: URL of website if available
price_btc: last traded price of best market
volume_btc: 24h trading volume recalculated to BTC
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 "
";
   foreach ($data as $row) echo $row->id." - ".$row->name."\n";
   echo "
";


Where do I put this URL: GET http://api.cryptocoincharts.info/listCoins
legendary
Activity: 1596
Merit: 1005
https://cryptodatabase.net
March 10, 2015, 08:38:43 PM
#5
Nothing happens, that just puts code on my page Undecided

What information are you wanting the information to show? For example, 'Joe wants to find the price between BTC and LTC what does he do?' or no?
newbie
Activity: 23
Merit: 0
March 10, 2015, 07:59:03 PM
#4
Nothing happens, that just puts code on my page Undecided
newbie
Activity: 23
Merit: 0
March 10, 2015, 06:32:44 PM
#3
I want to put this API info on a site so as to recieve all the available data. http://www.cryptocoincharts.info/tools/api
How do I do that?

What specifically are you looking to add? Each api they offer has example codes listed for them.

For example if you wanted to list all of the coins they track you would use the following code,

Code:
// fetch data
$curl curl_init();
curl_setopt($curlCURLOPT_URL"http://api.cryptocoincharts.info/listCoins");
curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
$rawData curl_exec($curl);
curl_close($curl);

// decode to array
$data json_decode($rawData);

That doesnt do anything except put code on my page

// show data
echo "
";
foreach ($data as $row) echo $row->id." - ".$row->name."\n";
echo "
"
;
?>


P.S. Big shout out to CryptoCoinCharts, I use their API for Crypto Database to show pricing information and to track coins highs and lows.
legendary
Activity: 1596
Merit: 1005
https://cryptodatabase.net
March 10, 2015, 02:30:43 PM
#2
I want to put this API info on a site so as to recieve all the available data. http://www.cryptocoincharts.info/tools/api
How do I do that?

What specifically are you looking to add? Each api they offer has example codes listed for them.

For example if you wanted to list all of the coins they track you would use the following code,

Code:
// fetch data
$curl curl_init();
curl_setopt($curlCURLOPT_URL"http://api.cryptocoincharts.info/listCoins");
curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
$rawData curl_exec($curl);
curl_close($curl);

// decode to array
$data json_decode($rawData);

// show data
echo "
";
foreach ($data as $row) echo $row->id." - ".$row->name."\n";
echo "
"
;
?>


P.S. Big shout out to CryptoCoinCharts, I use their API for Crypto Database to show pricing information and to track coins highs and lows.
newbie
Activity: 23
Merit: 0
March 10, 2015, 10:33:21 AM
#1
I want to put this API info on a site so as to recieve all the available data. http://www.cryptocoincharts.info/tools/api
How do I do that?
Jump to: