To create a websocket, login to your account at https://web3shards.io/console

Select the 'Live Data' tab and fill out the form. Choose a name, chain, and filter type - leave subscription type on 'websocket'.

Click 'Create'.

Your websocket will automatically hook up and your data will begin showing in the output window.

You can use your API Key and the websocket Room ID to connect to the websocket with the NodeJS library.

const Shards = require('web3-shards');

Shards.Sockets
.createConnection({
    chain: EVM.Ethereum,
    shardsApiKey: 'your-api-key',
    shardsWebsocketId: 'your-websocket-room-id'
})
.subscribe((dataType, data)=>{
    console.log(data);
})
.onDisconnect(()=>{
    console.log('disconnected');
})
.onError(_err=>{
    console.log(_err)
});

Get the NPM module https://www.npmjs.com/package/web3-shards