WebSocket = New WebSocket4Net.WebSocket("wss://ws.binaryws.com/websockets/v3") AddHandler WebSocket.Opened, Sub(s, e) socketOpened(s, e) AddHandler WebSocket.Error, Sub(s, e) socketError(s, e) AddHandler WebSocket.Closed, Sub(s, e) socketClosed(s, e) AddHandler WebSocket.MessageReceived, Sub(s, e) socketMessage(s, e) AddHandler WebSocket.DataReceived, Sub(s, e) socketDataReceived(s, e) websocket.Open() Console.WriteLine(websocket.State) websocket.AutoSendPingInterval = 10 websocket.Send("{""ticks_history"":""R_50"",""end"":""latest"",""count"":10}") End Sub Sub socketOpened(s As Object, e As EventArgs) websocket.Send("{""ticks_history"":""R_50"",""end"":""latest"",""count"":10}") End Sub Sub socketClosed(s As Object, e As EventArgs) End Sub Sub socketError(s As Object, e As SuperSocket.ClientEngine.ErrorEventArgs) MsgBox(e.Exception.ToString ) End Sub Sub socketMessage(s As Object, e As WebSocket4Net.MessageReceivedEventArgs) MsgBox(e.Message) End Sub Sub socketDataReceived(ss As Object, e As WebSocket4Net.DataReceivedEventArgs) MsgBox(e.Data) End Sub