const ws = new WebSocket( `wss://ticaro.ir/ws/prices?token=${apiKey}` ); ws.onmessage = ({ data }) => { const tick = JSON.parse(data); // { pair, price, change_24h, source, ... } console.log(tick.pair, tick.price); };