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

Are Channels Implemented in the API? #30

Open
verona-rupes opened this issue Dec 25, 2017 · 7 comments
Open

Are Channels Implemented in the API? #30

verona-rupes opened this issue Dec 25, 2017 · 7 comments

Comments

@verona-rupes
Copy link

I've been reading through the gdax official documentation and they mention that we need to subscribe to channels in order to get updates. I couldn't find any channel subscriptions in the code. Is the WebsocketFeed stream subscribe to a "full channel" ?

https://docs.gdax.com/#channels

@robevansuk
Copy link
Collaborator

robevansuk commented Jan 22, 2018

yes its not implemented yet - I'm attempting to build a full-channel + gui on top. Whilst that is hard to do its relatively simple to subscribe to the messages using the WebsocketFeed. I've attempted this in my own repo here: https://github.com/robevansuk/gdax-java/blob/master/src/main/java/com/coinbase/exchange/api/gui/orderbook/OrderBookView.java

@robevansuk
Copy link
Collaborator

almost have a working example now. Essentially you need to process messages in sequential order. Since the websocketfeed relies on TCP based comms you should get all the messages, you just need to process them in the correct order... and timeout if the one you're waiting for next doesn't arrive in a sensible time frame.

@robevansuk
Copy link
Collaborator

I have a working example - it will be available soon enough. Next few days or couple of weeks max I'm hoping

@robevansuk
Copy link
Collaborator

I've implemented the LiveOrderbook now should be available any day now with any luck

@verona-rupes
Copy link
Author

verona-rupes commented Feb 25, 2018

I kinda refactored your code for level2 and ticker channels. It was quick and dirty just to get my bot running. I realized that the connections through org.apache.tomcat.websocket.WsWebSocketContainer keeps disconnecting when using channels. Not sure why. so I switched the socket implementation to TooTallNate/Java-WebSocket. which is a standalone socket implementation and it worked fine.
Edit: l2update and ticker channels don't require authentication.

@robevansuk
Copy link
Collaborator

ok - Full LiveOrderbook is available now over at my repo www.github.com/robevansuk/gdax-java. Fully tested and reconnects on timeouts if the message we're waiting for isn't received within 15 seconds.

@robevansuk
Copy link
Collaborator

I figure realtime is likely to offer much better algo trading! imaging monitoring the rate of trades coming in, seeing a spike and being able to place a trade instantly. Surely that's going to make/save more than a few %?

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