What is the API to get Bitcoin's real-time Buy price and sell price on my site? and how can get it from to implement in my website developed in PHP.
use this, its the easiest way to do that ->
<?php
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_HTTPHEADER, array('Accept: application/json', 'Content-Type: application/json'));
curl_setopt($c, CURLOPT_URL, 'http://data.mtgox.com/api/2/BTCUSD/money/ticker');
$data = curl_exec($c);
curl_close($c);
$obj = json_decode($data);
?>
<table>
<tr>
<td>
<?php echo print_r($obj->{'data'}->{'avg'}->{'display_short'}, true);?>
</td>
</tr>
</table>
</div>
Works like a charm
i know this post was kinda old, but no one actually give some real answers so here is mine >.<