Get live BTC value data
To get live data on the value of BTC simply connect to the websocket at wss://btc.data.hxro.io/live
this requires the ws library, to install the library just use npm install ws
const WebSocket = require('ws');
var socket = new WebSocket('wss://btc.data.hxro.io/live');
socket.onmessage = function (event) {
var message = event.data;
console.log(JSON.parse(message));
};
Updated about 4 years ago