Files
trade-drift-dlob/example/newClient.ts
Nour Alharithi e047def3a6 newclient
2023-10-26 08:25:17 -07:00

18 lines
308 B
TypeScript

import { io } from 'socket.io-client';
const main = async () => {
const socket = io('http://localhost:3000');
socket.on('connect', () => {
socket.emit('subscribe', 'SOL-PERP');
});
socket.on('SOL-PERP', (data: any) => {
console.log(data);
});
};
main().then(() => {
console.log('running');
});