Created
February 11, 2017 20:00
-
-
Save wen-dell/7fe39aada59e4d2bd08043fa68bb8507 to your computer and use it in GitHub Desktop.
Página principal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="pt-br"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="author" content="Wendell Alves"/> | |
<meta name="description" content="Página que mostra detalhes sobre o Bitcoin"/> | |
<meta http-equiv="refresh" content="300"/> <!-- Atualiza a cada 5 minutos --> | |
<title>Gráfico do Bitcoin</title> | |
</head> | |
<body> | |
<p>Valor atual do Bitcoin: R$<span id="output"></span></p> | |
<p id="p1"></p> | |
<!--<div style="width:900px; height:900px;">--> | |
<!--<canvas id="grafico"></canvas>--> | |
<!--</div>--> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.4/Chart.min.js"></script> | |
<script src="js/jquery-3.1.1.min.js"></script> | |
<script> | |
var dados; | |
$.ajax({ | |
url: 'https://api.blinktrade.com/api/v1/BRL/trades?limit=2', | |
dataType: 'jsonp', | |
data: dados, | |
async: true, | |
success: function (dados) { | |
trataJson(dados); | |
} | |
}); | |
function trataJson(dados){ | |
for(var i = 0; i < dados.length; i++){ | |
console.log(dados[i].date); | |
} | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment