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

Websocket #25

Open
nerrawymerej opened this issue Mar 1, 2018 · 1 comment
Open

Websocket #25

nerrawymerej opened this issue Mar 1, 2018 · 1 comment

Comments

@nerrawymerej
Copy link

Can someone please provide an example of how to use the RealtimeClient websocket?

I am learning how to code and can't figure this part out. I have gotten everything else in this library working except this part.

I started like this:

` string[] prods = {"BTC-USD"};

        var realtimeClient = new RealtimeClient(new Uri("wss://ws-feed.gdax.com"), prods);`

I can't figure out where to go from here. realtimeClient.SubscribeAsync(messageRecieved)...?
what message goes in here?

Thanks in advance for any help.

@lgarcia11
Copy link

lgarcia11 commented Mar 3, 2018

@nerrawymerej
'messageRecieved' is the action that will be called, you can try this.

realtimeClient.SubscribeAsync(message=> DoSomeStuff(message));

void DoSomeStuff(string message)
        {

        }

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

2 participants