Closed pspsales closed 3 years ago
Update: It does seem to be receiving data, just always shows as Closed as the status message, is this normal for Bittrex?
If it is closed that would be normal ;)
Are you sure they aren't supposed to be closed?
Sorry for the late reply, it seems to be on/off working when I update the Nuget packages.
Full sample receiving no data & web socket closes just after creation: 2021/03/13 12:53:54:503 | Bittrex | Info | Authentication successful 2021/03/13 12:53:55:548 | Bittrex | Info | Socket 1 closed
`Public Class Form1 Private API_Key As String = "xxxxx" Private API_Secret As String = "xxxxx" Private Bittrex_socketClient As Bittrex.Net.BittrexSocketClient
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim TmpOptions As New BittrexSocketClientOptions
TmpOptions.ApiCredentials = New ApiCredentials(API_Key, API_Secret)
Bittrex_socketClient = New BittrexSocketClient(TmpOptions)
TmpOptions.AutoReconnect = True
Bittrex_SubscribeToOrderUpdates()
End Sub
Private Sub SocketListener1(ByVal OrderData() As String)
MessageBox.Show("I Received Some Data!")
End Sub
' Subscribe To Trade Listener
Private Async Sub Bittrex_SubscribeToOrderUpdates()
Await Bittrex_socketClient.SubscribeToOrderUpdatesAsync(Sub(data As Sockets.BittrexOrderUpdate) SocketListener1(New String() {"I Received Some Data"}))
End Sub
End Class`
Reverting to 4.3.1 & switching to V3 class names resolves the issue currently.
Sample working (4.3.1):
`Public Class Form1 Private API_Key As String = "xxxxxx" Private API_Secret As String = "xxxxxx" Private Bittrex_socketClient As Bittrex.Net.BittrexSocketClientV3
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim TmpOptions As New BittrexSocketClientV3Options
TmpOptions.ApiCredentials = New ApiCredentials(API_Key, API_Secret)
Bittrex_socketClient = New BittrexSocketClientV3(TmpOptions)
TmpOptions.AutoReconnect = True
Bittrex_SubscribeToOrderUpdates()
End Sub
Private Sub SocketListener1(ByVal OrderData() As String)
MessageBox.Show("I Received Some Data!")
End Sub
' Subscribe To Trade Listener
Private Async Sub Bittrex_SubscribeToOrderUpdates()
Await Bittrex_socketClient.SubscribeToOrderUpdatesAsync(Sub(data As Sockets.BittrexOrderUpdate) SocketListener1(New String() {"I Received Some Data"}))
End Sub
End Class `
It looks like since version 5.0.0 the SocketClient stopped working. I changed my program from 4,3,1 to 5 and changed all V3-calls. Now it doesn't subscribe to any Socket anymore.
You're right, there was an issue with the authentication in the socket client. I've resolved this in 5.0.1. Let me know if you have any other issues.
Many many thanks, still playing with the API, it seems to work very well for data tracking :)
Shall definitely be donating soon!!
Appreciated :)
Sample code:
Also while I'm posting this: Examples / ClientConsole / Program.cs - Line 62 - SubscribeToAccountUpdates - Does not exist.