Public Sub WebSocketConnect As ResumableSub
wait for (Main.Shrimpy.GetWebsocketToken) complete(result As String)
If result.Contains("SocketTimeoutException: timeout") Then
Return False
End If
Private wst As String = result.As(JSON).ToMap.Get("token")
Main.WebSocket.Initialize("ws")
Dim wsurl As String = "wss://ws-feed.shrimpy.io?token=" & wst
Main.WebSocket.Connect(wsurl)
wait for ws_Connected
Log("Websocket connected")
Return True
End Sub