gdax-java icon indicating copy to clipboard operation
gdax-java copied to clipboard

Pricing API? How do I get buy, sell or spot prices?

Open venkateshthallam opened this issue 7 years ago • 3 comments

I see coinbase has a Pricing API to retrieve all these details, but didn't find anything in the GDAX documentation? Should I use coinbase API for pricing instead?

venkateshthallam avatar Nov 26 '17 16:11 venkateshthallam

You have a few choices.

  1. For the best bid/ask you will need to call the MarketDataService.getMarketData(product, level) which will return a MarketData object with bids/asks. Do with this what you will. Request level 1 data
  2. For the top 50 I believe you can do a level 2 getMarketData request - this will return something like the top 50 bids/asks in the same way as above.
  3. Download the entire orderbook as it currently stands - this is a level 3 request for the product Id. This will provide a snapshot in time of all bids/asks.
  4. to maintain a live orderbook - this is being worked on and will be available as soon as reasonably possible.

Please see the GDAX documentation for more info https://docs.gdax.com/#market-data

robevansuk avatar Jan 22 '18 22:01 robevansuk

Better documentation needed in this lib so people don't get lost in the Gdax Api Docs

robevansuk avatar Jan 22 '18 23:01 robevansuk

Live orderbook is completed now. Just need a few minor tweaks and I can probably create a pull request tomorrow.

robevansuk avatar Feb 25 '18 22:02 robevansuk