irufus / gdax-java

Java based wrapper for Coinbase Pro (Formerly known as GDAX API and Coinbase Exchange API)
MIT License
177 stars 131 forks source link

added pagination to the calls #14

Closed robevansuk closed 7 years ago

robevansuk commented 7 years ago

Added pagination to the calls that made sense. tidied up the project dependencies (might have done that last time). provided better documentation about whats offered from this client library. more tests (warning: a lot of untested methods as well - these are provided as a convenience but require integration with the coinbase api really since they rely on coinbase account details). Another version bump. Added payments/transfers/withdrawal api calls. Changed name of everything to GDAX rather than coinbase since there is already a coinbase api which makes it confusing otherwise. Report calls implemented.

Outstanding - comprehensive tests for all the new endpoints. Will get these added in time but need the sandbox exchange to come back online!

irufus commented 7 years ago

Sorry for the wait

robevansuk commented 7 years ago

No worries - I got the websocket feed working by the way. I then went down the route of trying to build a functioning GUI for the orderbook as I've noticed in the past that the GDAX website went down but the API was still up and running. This meant when the price dropped (after the SEC didn't approve the bitcoin ETF), there were a ton of buy orders which could have gotten in a lot lower - if only they'd had access. So I thought a downloadable, usable GUI front end might be a good work around for this. I've not spent any time on it for the past few weeks as I went on holiday and haven't managed to start back up again yet - a lot going on. Anyway I wondered how good you were with orderbook stuff? Seems like you may have a background in it? Is it something you could be interested in working on? Regards, Rob

On Fri, May 12, 2017 at 4:42 PM, Ishmael Rufus notifications@github.com wrote:

Sorry for the wait

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/irufus/gdax-java/pull/14#issuecomment-301112187, or mute the thread https://github.com/notifications/unsubscribe-auth/ADuxmxHMgtYfxm3fTr4j1NEhkXJZp49Gks5r5H4BgaJpZM4MFl68 .

irufus commented 7 years ago

Oh yeah I have a lot going as well (starting a new job soon)

When I originally started this project my intent was building a platform that would add more features than what Coinbase Exchange (GDAX) offered like automatic trading, signal trading and peer trading. So building separate features like a usable GUI for the order book would be beneficial.

Right now the current order book on GDAX is very chaotic and could probably use something that is more user friendly and useful. (Not a fan of top-down order books) I see a lot of features in platforms like ThinkOrSwim (ThinkTDA) that would certainly help with this issue.

This is something I am interested in working on and will try to take a look at starting next week. (Hopefully earlier)

robevansuk commented 7 years ago

Good news all round! Are you going anywhere exciting for your next role? I'm not familiar with ThinkOrSwim so will have to see if I can find out more about it.

Here's the link https://github.com/robevansuk/gdax-java/tree/websocketfeed

./gradlew bootRun or the equivalent for Windows.

Hopefully start back up on this some day soon.

On Thu, May 18, 2017 at 5:31 PM, Ishmael Rufus notifications@github.com wrote:

Oh yeah I have a lot going as well (starting a new job soon)

When I originally started this project my intent was building a platform that would add more features than what Coinbase Exchange (GDAX) offered like automatic trading, signal trading and peer trading. So building separate features like a usable GUI for the order book would be beneficial.

Right now the current order book on GDAX is very chaotic and could probably use something that is more user friendly and useful. (Not a fan of top-down order books) I see a lot of features in platforms like ThinkOrSwim (ThinkTDA) that would certainly help with this issue.

This is something I am interested in working on and will try to take a look at starting next week. (Hopefully earlier)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/irufus/gdax-java/pull/14#issuecomment-302463617, or mute the thread https://github.com/notifications/unsubscribe-auth/ADuxm3X8UdDgvQE65-CT8Usbva93BzChks5r7HJggaJpZM4MFl68 .

venkateshthallam commented 6 years ago

@robevansuk Quick question about the websocket example. I put the following code in a method which I am calling at the startup.

Subscribe message = new Subscribe(); message.setType("subscribe"); message.setProduct_ids(product_ids); System.out.println("wsfeed is "+wsfeed+" orderBookView is "+orderBookView); if(wsfeed!=null) wsfeed.subscribe(message, orderBookView); For some reason, the onOpen() method in the websocketfeed.java doesn't initialize userSession and the sendMessage is failing with null pointer. I understand that it happens when there is no event fired as the socket is not opened. But I fail to see the actual reason while socket connection is not working.

I have put all the necessary parameters in my property file and that doesn't seem to be the issue. Appreciate any direction on how to resolve this or any actual working example. I am using this in a Spring boot project by the way.``

robevansuk commented 6 years ago

product_ids should be a comma separated list of IDs you want to receive messages for. I'm looking to rewrite this bit anyway as its not working the way it should

robevansuk commented 6 years ago

Follow this bit of code which already works.

private void subscribeAndQueueMsgs(OrderBookView thisOrderBook) {
        log.info("*** Subscribing ***");
        websocketFeed.subscribe(new Subscribe(productIds), thisOrderBook);
    }