Skip to content

Instantly share code, notes, and snippets.

Last active December 17, 2015 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/5551437 to your computer and use it in GitHub Desktop.
Save anonymous/5551437 to your computer and use it in GitHub Desktop.
gets last price from mt gox
<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) {
$("#price").text(data.return.last.display_short)
});
});
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment