-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
29 lines (23 loc) · 815 Bytes
/
index.html
File metadata and controls
29 lines (23 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<html>
<head>
<title>StarKey</title>
<script src="https://unpkg.com/lightweight-charts/dist/lightweight-charts.standalone.production.js"></script>
</head>
<body>
<h2>Trades</h2>
<div id="chart"></div>
<div id="trades"></div>
<script>
// var binanceSocket = new WebSocket("wss://stream.binance.us:9443/ws/btcusdt@trade");
var tradeDiv = document.getElementById('trades')
/*
binanceSocket.onmessage = function (event) {
console.log(event.data);
var messageObject = JSON.parse(event.data)
tradeDiv.append(messageObject.p)
}
*/
</script>
<script src="chart.js"></script>
</body>
</html>