Skip to content

Instantly share code, notes, and snippets.

@orb
Forked from anonymous/mtgox.html
Created May 10, 2013 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orb/5551581 to your computer and use it in GitHub Desktop.
Save orb/5551581 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>TEST</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
</head>
<body>
Bitcoin price is <b id="price">--</b>
<script>
$(function(){
$.get("https://data.mtgox.com/api/1/BTCUSD/ticker", function(data) {
if (typeof data == "string") {
data = $.parseJSON(data);
}
$("#price").text(data.return.avg.display_short);
});
});
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment