I use the below code to stop the WebSocket connection after 60 seconds but I continue to receive pings, what’s wrong?
setTimeout(() => {
ws.send(JSON.stringify({
"id": "userDataStreamStop",
"method": "userDataStream.stop",
"params": {
"listenKey": listenKey,
"apiKey": API_KEY
}
}));
}, 1 * 60 * 1000);