Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the Authentication in socketClient missing? #1

Closed
frontierer opened this issue Dec 14, 2018 · 1 comment
Closed

Is the Authentication in socketClient missing? #1

frontierer opened this issue Dec 14, 2018 · 1 comment

Comments

@frontierer
Copy link

Hi! Seems like I have failed to use the "SubscribeToOrderUpdates" function in socketClient because I could not find a place to authenticate myself like what I did in REST request

 using (var socketClient = new HuobiSocketClient())
                {
                    //Able to listen
                    socketClient.SubscribeToMarketKlineUpdates("ethusdt", HuobiPeriod.FiveMinutes, data =>
                    {
                        Console.WriteLine("Received kline update. Last price: " + data.Close);

                    });

                    //Unable to listen
                    socketClient.SubscribeToOrderUpdates(data =>
                    {
                        Console.WriteLine("Received order update. Last price: " + data.ToString());
                    });
                    Console.ReadLine();
                }

Is the Authentication in socketClient missing, or is there any problem with my code?

Thanks,!

@frontierer
Copy link
Author

Sorry that I missed your instruction of setting the Default Options before use, now I added the lines and it works now:

HuobiSocketClient.SetDefaultOptions(new HuobiSocketClientOptions() { ApiCredentials = new ApiCredentials(HuobiApiKey, HuobiApiSecret), });

JKorf pushed a commit that referenced this issue Aug 1, 2019
JKorf pushed a commit that referenced this issue Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant