Bitcoin Forum
May 26, 2024, 02:50:45 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin's real-time Buy and Sell price API  (Read 2263 times)
ptahiliani (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
June 25, 2013, 10:50:11 AM
 #1

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.
Ascension
Sr. Member
****
Offline Offline

Activity: 457
Merit: 250



View Profile
June 25, 2013, 10:53:51 AM
 #2

They have a PHP example here --> https://en.bitcoin.it/wiki/MtGox/API/HTTP
BCB
CTG
VIP
Legendary
*
Offline Offline

Activity: 1078
Merit: 1002


BCJ


View Profile
June 25, 2013, 11:02:32 AM
 #3


BTC-e.com
Crypty.com

All share the same API as MtGox.com and have examples in PHP and other languages under the API section of their respective websites.
akipfer
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile WWW
December 01, 2013, 03:53:41 AM
 #4

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 ->


Code:


<?php
$c 
curl_init();
curl_setopt($cCURLOPT_RETURNTRANSFER1);
curl_setopt($cCURLOPT_HTTPHEADER, array('Accept: application/json''Content-Type: application/json'));
curl_setopt($cCURLOPT_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 Cheesy
i know this post was kinda old, but no one actually give some real answers so here is mine >.<

BTC 1LDZwmLNULuEKPANry5DTbH5seLKwph8ua         | [WebSite off] coopersite.com.br | Aceitaremos Moedas como pgto | Procurando franqueados!
LTC  LYMQwZbBHK2kdD7SJnxCnn8NcwbiFAmgnV        | [Twitter] https://twitter.com/allankipfer
[M.B.] Rules - [M.B.]-[Mercado Bitcoin] Esta da hora!   | [Facebook] http://www.facebook.com/allan.kipfer.tbo
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!