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

Examples of the WebsocketFeed? #37

Open
MarcDee91 opened this issue Jan 31, 2018 · 5 comments
Open

Examples of the WebsocketFeed? #37

MarcDee91 opened this issue Jan 31, 2018 · 5 comments

Comments

@MarcDee91
Copy link

Hi,
Is there a example of how to use the "WebsocketFeed" for caching a snapshot of the orderbook provided?

I look forward for your help!
Regards
Marko

@robevansuk
Copy link
Collaborator

It's in development but its a tough nut to crack since the messages come through out of sync. Hopefully be ready some day soon. In the mean time the docs are available here : https://docs.gdax.com/#the-code-classprettyprintlevel2code-channel

@robevansuk
Copy link
Collaborator

You'll be happy to hear I almost have this sorted now. Slight problem in that I've discovered what I think is another bug on their side. I'm just reporting it now along with a couple of others that were reported here.

@robevansuk
Copy link
Collaborator

The implementation portion is complete and functioning. Will amend my tests as I had to do some major refactoring and this resulted in a re-evaluation of a bunch of tests that were too coarse grained. Need to refine them so that everything is easier to follow/use/understand for others. Will be done in the next few days/couple of weeks.

@robevansuk
Copy link
Collaborator

I think I may have misunderstood your original question. You are asking for a snapshot of the orderbook.. this is provided by the MarketDataService.getMarketData(productId, level);

Level is an integer 1, 2 or 3.

  • 1 - top bid/ask
  • 2 - top 50 bids/asks
  • 3 - all bids/asks

The LiveOrderbook is now just about ready, barring a few tweaks I need to make. Hopefully no more than a few days away now.

@robevansuk
Copy link
Collaborator

Found the implementation I have works well when logging is removed - had it running well over 12 hours now. Reconnection works. Almost everything looks good. Only problem now is my version has deviated from the live, web version so I need to figure out why. I have an idea why its failing. So hopefully not much more to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants