Overview
Last updated
We use Socket.IO v4 protocol for WebSocket communication.
WebSocket URL:
for sandbox: https://wss-test.1dex.com/socket.io
for production: https://wss.1dex.com/socket.io
Protocol: Socket.IO v4
Ping Interval: 10 seconds
Ping Timeout: 5 seconds
Connection Timeout: 5 seconds
Users can authenticate by sending the authenticate event:
socket.emit('authenticate', 'api-key');
socket.on('authenticated', (response) => {
console.log(response);
// response:
// {
// "status": "success",
// "account": "account"
// }
});Last updated
socket.emit('unauthenticate', 'api-key');