Author

Topic: Mt gox ticker (Read 418 times)

newbie
Activity: 13
Merit: 0
May 01, 2013, 04:16:30 AM
#3
thanks for the share, this will definitely come in handy
newbie
Activity: 17
Merit: 0
May 01, 2013, 04:06:30 AM
#2
There are much better tools in Python for MtGox.
newbie
Activity: 46
Merit: 0
April 16, 2013, 04:53:45 PM
#1
if anyone is looking for an easy MTgox price ticker in PHP, After digging around I found one that still works

Code:

$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);

echo 
print_r($obj->{'data'}->{'avg'}->{'display_short'}."\n"true);

?>


edit got it
last price
Code:
echo print_r($obj->{'data'}->{'last'}->{'display_short'}."\n"true?>
Jump to: