I'm trying to get market data from bingx websocket API but once my connection stablished i recieve blob data and i dont know how can i read candlestick data from that blob response with javascript does any one know how can i extract data?
here is my Js code :
var ws = new WebSocket('wss://open-ws-swap.bingbon.pro/ws');
ws.onopen = (event) => {
const msg = {
id: "548",
reqType:"sub",
dataType: "market.kline.BTC-USDT.1min",
}
ws.send(JSON.stringify(msg));
console.log('connection stablished!')
}
// Listen for messages
ws.onmessage = function(event) {
console.log(event.data);
}
ws.onclose = function(event) {
console.log(event)
};
ws.onerror = function(error) {
console.log(error);
};
And here is the result in console:
I tried this answer bot not working: text