Giter Site home page Giter Site logo

gdax-java's Introduction

Coinbase Pro

Join the chat at https://gitter.im/irufus/gdax-java

Java based wrapper for the Coinbase Pro API

Notes:

Coinbase Pro primary data sources and servers run in the Amazon US East data center. To minimize latency for API access, we recommend making requests from servers located near the US East data center. Some of the methods do not yet have tests and so may not work as expected until someone tries them and fixes them at a later date. Please raise an issue in github if you want something in particular as a priority. This codebase is maintained independently of Coinbase. We are not in any way affiliated with coinbase or coinbase pro.

Functions supported:

  • Authentication (GET, POST, DELETE supported)
  • Get Account
  • Get Accounts
  • Get Account History
  • Get Holds
  • Place a new Order (limit order)
  • Get an Order
  • Cancel an Order
  • List all open Orders
  • Get Market Data
  • List fills
  • List Products
  • HTTP Error code support
  • List of Currencies - from Accounts
  • Withdrawals - from coinbase accounts / payment methods / crypto account address
  • Deposits - from coinbase accounts / payment methods
  • Transfers - from coinbase accounts
  • Payment methods - coinbase / payment methods
  • Reports
  • Pagination support for all calls that support it.
  • Pagination support for all calls that support it.
  • Sandbox support - sandbox support was dropped by gdax so this is now redundant

In Development

Check the issues on the repo for open items to work on. Please join the gitter channel if you have any questions. Support always welcome. Note the channel uses the legacy name of 'gdax-java' rather than 'coinbase-pro-java'

Contributing

Please see CONTRIBUTE.md if your interested in getting involved.

Usage


If you commit your secure keys, passphrase or secrete, disable/delete them from Coinbase Pro immediately.

  1. tests can be run with ./gradlew test, and ./gradlew integrationTest.
    1. unit tests have file/class names ending Test and run locally
    2. integration tests have file/class names ending IntegrationTest and should run against the sandbox api

Examples

To make use of this library you only need a reference to the Service that you want.

  • For Accounts, get an instance of the AccountService See CONTRIBUTING.md for an example of how to do this
  • For MarketData, use the MarketDataService, and so on.

Examples


At present the Services and Data objects returned should match the interface specified in the Coinbase Pro api here: https://docs.pro.coinbase.com/#api

Each Service class requires the CoinbaseExchange object (see CONTRIBUTING.md for examples of how to create this) so that methods calling the REST endpoints can be made, using a RestTemplate that has the correct headers and signatures is used.

API


This library is as set up as follows: (Note: this section is likely to change over time)

  • AccountService.getAccounts() - returns a List Accounts
  • AccountService.getAccountHistory(String accountId) - returns the history for a given account as a List
  • AccountService.getHolds(String accountId) - returns a List of all held funds for a given account.
  • DepositService.depositViaPaymentMethod(BigDecimal amount, String currency, String paymentMethodId) - makes a deposit from a stored payment method into your GDAX account
  • DepositService.coinbaseDeposit(BigDecimal amount, String currency, String coinbaseAccountId) - makes a deposit from a coinbase account into your GDAX account
  • MarketDataService.getMarketDataOrderBook(String productId, String level) - a call to ProductService.getProducts() will return the order book for a given product. You can then use the WebsocketFeed api to keep your orderbook up to date. This is implemented in this codebase. Level can be 1 (top bid/ask only), 2 (top 50 bids/asks only), 3 (entire order book - takes a while to pull the data.)
  • OrderService.getOpenOrders(String accountId) - returns a List of Orders for any outstanding orders
  • OrderService.cancelOrder(String orderId) - cancels a given order
  • OrderService.createOrder(NewOrderSingle aSingleOrder) - construct an order and send it to this method to place an order for a given product on the exchange.
  • PaymentService.getCoinbaseAccounts() - gets the coinbase accounts for the logged in user
  • PaymentService.getPaymentTypes() - gets the payment types available for the logged in user
  • ProductService.getProducts() - returns a List of Products available from the exchange - BTC-USD, BTC-EUR, BTC-GBP, etc.
  • ReportService.createReport(String product, String startDate, String endDate) - not certain about this one as its untested but presumably it generates a report of a given product's trade history for the dates supplied - dates are assumed to be ISO 8601 compliant
  • TransferService.transfer(String type, BigDecimal amount, String coinbaseAccountId) - initiates a transfer to your (standard) Coinbase account.
  • UserAccountService.getTrailingVolume() - Returns the 30 day trailing volume information from all accounts
  • WithdrawalsService - methods that enable Withdrawals from a Coinbase-Pro account to a Coinbase Account/Payment method

WebsocketFeed API


The WebsocketFeed is implemented and works. However, there are techniques to using it successfully for production use - e.g. monitoring for 'heartbeats'.

To use the WSF check out the API documentation and look at usages of websocketFeed.subscribe(String) as an example that already works.

Updates - v 0.11.0


  • decoupling the api code from the spring boot desktop client application so the api can be used and eventually published as a library.
  • decoupling model code so that it can become shared/common for multiple projects and make building out a FIX client potentially easier
  • decoupling the websocketfeed code from the api implementation
  • new security module so websocketfeed and api can share the Signature code
  • removal of the gui desktop app - this needs rebuilding properly (with tests)
  • new modularised multi-project gradle build
  • centralised dependency versioning for libraries, in the root build.gradle as its easier to manage them in a single location
  • segregating the unit tests from the integration tests
  • updated api/sandbox-api endpoints for use with tests
  • renaming project to Coinbase-Pro-java in the settings.gradle file
  • remove joda time lib in favour of the standard library Instant implementation JavaTimeModule for the ObjectMapper
  • updated libraries to newer versions: spring boot, jackson, gson, etc.
  • removal of Gson in favour of Jackson libs
  • updated classes to use constructor injection rather than field based

Updates - v 0.9.1


  • building an order book that works ready for a desktop client.

Updates


  • converted to using Gradle as a build tool
  • converted to using SpringBoot for DI and request building
  • updated all libraries used - removed some unnecessary libraries
  • refactored the code to remove error handling from every method (rightly/wrongly) - its easier to maintain and extend now as a result
  • more modular code that matches the service api - favour composition over inheritance
  • removed a lot of boilerplate code
  • logging added - Logging will output an equivalent curl command now for each get/post/delete request so that when debugging you can copy the curl request and execute it on the command line.
  • service tests added for sanity - no unit tests against the data objects
  • better configuration options using application.yml for your live environment and application-test.yml for your sandbox environment.
  • banner displayed (specific to each environment) :)
  • generally more structure.
  • added pagination to all the relevant calls (some not supported since it seems pointless due to the limited offering from gdax - e.g. products)
  • GDAX is updating its API without updating documentation - I've fixed an issue with market data because of this.
  • WebsocketFeed added
  • OrderBook GUI component added - enable in the application.yml by setting enabled to true
  • LiveOrderBook (full channel) Implemented and viewable via the GUI when enabled

TODO


  • add pagination versions of all endpoints, or offer a way to append to the endpoint urls.

From the GDAX API documentation the Websocket implementation follows the following implementation: Send a subscribe message for the product(s) of interest and the full channel. Queue any messages received over the websocket stream. Make a REST request for the order book snapshot from the REST feed. Playback queued messages, discarding sequence numbers before or equal to the snapshot sequence number. Apply playback messages to the snapshot as needed (see below). After playback is complete, apply real-time stream messages in sequential order, queuing any that arrive out of order for later processing. Discard messages once they've been processed.

gdax-java's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gdax-java's Issues

Cloudflare Blocking access: "User-Agent" needs to be added to the header

Unable to reach the sandbox API I noted that the exception was stating Cloudflare was blocking me due to unknown user-agent. The solution to this is to add a User-Agent string to the header.

headers.add("User-Agent", "MyAgent");

Most of the unit tests are working again with this change.

Spring example

Hi, I´m not new to Spring but i am new to Spring Boot.

I think your library is quite good (or will be when i get to use it) but the curve to start it off is really hard, even for those who know Spring, there is no guide to how to setup the most basic scenario. I recommend you to make a very basic controller/main/example inside the

After various intents on implementing a basic bot with this wrapper I wanted to ask. Could you post a simple process for creating and executing one? Every time i try to get any service its null, even if i autowire it in a way i think is correct and i´m not sure where/how i should put my source code.

For example, to obtain "the ticker" for a certain market:

  • Add your credentials to app.yaml.
  • Create your source file inside com.coinbase.exchange.api.
  • Subscribe to websocket feed.
  • Autowire the class as component.
  • Call your controller.
  • Etc.

Thanks

Miguel.

Handle Rate Limits

When a rate limit is exceeded, a status of 429 Too Many Requests will be returned.

Paged requests could be implemented better

I believe paged requests could be better implemented by overloading the GdaxExchange.get(...) method and providing an interceptor that updates the request headers. This would clean up a lot of the boilerplate and make transitioning between either method more seamless.

Problem with Jar

Hello everyone.

I don't know if i am doing something wrong here but for some reason i cant correctly generate the jar to use in my project. Already spent some time trying. If anyone could please provide the jar or explain how they generated if i would appreciate it.

Thank you all.

WebsocketFeed stops receiving messages

When I run the GUI, the websocket invariably stops receiving messages with no indication of a failure. I'm not directly using the GUI, I'm just logging matched orders from the swing worker. I added a println and at least some of the time the socket returns this close reason "code [1006], reason [Unexpected end of stream]".

If anyone can point me in the right direction to figure out why this happens that would be great; I'm trying to achieve an always-on, super stable feed. This repo is awesome, thanks to all contributors!

Can I just get a jar?

I just want the jar. ./gradlew jar does not work. i dont want to run this in spring boot. just standalone java application.

Example / Quick Start

I'm not used to spring, so it would be very helpful to have an example, or a small sort of quick-start explanation how to get started using the your API. I managed to build it using the Eclipse IDE, and also to run the unit tests, but struggling now how to start. It would be helpful to have a description of - for example - just read my account-data.
thx in advance!

Recommend using Lombok for Data Transfer Objects, and toString methods in each DTO

Hi,

I'd recommend using Lombok for DTO's such as Account, Order etc, which will take away the boilerplate code for getters/setters,

And more importantly, introduce toString() methods for all, so that it's easy to log out a list of Orders / Accounts etc. (If using Lombok, @DaTa annotation will automatically add toString). If not using Lombok, this should be added to DTOs manually for ease of client use.

build.gradle
compileOnly('org.springframework.boot:spring-boot-configuration-processor')
compileOnly('org.projectlombok:lombok')

Account.java
@DaTa annotation.

Thanks.

Websocket is not working with the sandbox environment

WebSocket is not working with the sandbox environment.
Error:


javax.websocket.DeploymentException: The HTTP request to initiate the WebSocket connection failed
    at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServerRecursive(WsWebSocketContainer.java:485)
    at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:194)
    at org.springframework.web.socket.client.standard.StandardWebSocketClient$1.call(StandardWebSocketClient.java:150)
    at org.springframework.web.socket.client.standard.StandardWebSocketClient$1.call(StandardWebSocketClient.java:147)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: javax.net.ssl.SSLException: Received fatal alert: handshake_failure
    at org.apache.tomcat.websocket.AsyncChannelWrapperSecure$WrapperFuture.get(AsyncChannelWrapperSecure.java:512)
    at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServerRecursive(WsWebSocketContainer.java:343)
    ... 5 common frames omitted
Caused by: javax.net.ssl.SSLException: Received fatal alert: handshake_failure
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1666)
    at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1634)
    at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1800)
    at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1083)
    at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:907)
    at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
    at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
    at org.apache.tomcat.websocket.AsyncChannelWrapperSecure$WebSocketSslHandshakeThread.run(AsyncChannelWrapperSecure.java:392)

Ref: https://stackoverflow.com/questions/49648694/java-websocket-client-not-working-with-gdax-sandbox-environment

Syntax error on WebsocketFeed

this.objectMapper = objectMapper(new JavaTimeModule());

should probably be:

this.objectMapper = objectMapper.registerModule(new JavaTimeModule());

Otherwise, I get the following error when executing build tasks:

.../gdax-java/src/main/java/com/coinbase/exchange/api/websocketfeed/WebsocketFeed.java:58: error: cannot find symbol
this.objectMapper = objectMapper(new JavaTimeModule());
^
symbol: method objectMapper(JavaTimeModule)
location: class WebsocketFeed
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

FAILURE: Build failed with an exception.

PaymentService.getPaymentTypes and PaymentService.getCoinbaseAccounts fail due to various data type issues

Call to GET /payment-methods fails due to:

  • limits expecting an array, but the response is actually a single value
  • the return type expected a single PaymentTypes object, but the response is actually an array

See https://docs.gdax.com/#payment-methods

This was fixed by #20 commit 500657d

Call to GET /coinbase-accounts fails due to:

  • the return type expected a single CoinbaseAccounts object, but the response is actually an array

See https://docs.gdax.com/#coinbase-accounts

This was fixed by #20 commit f422a9e

what is "api keys" ?

I just have username and password on gdax ... where should I enter that in application.yml ?

or there is another "key" that I am not aware ?

by the way is there any simple example, in one .java file just to do login and get the orderbook ? (using the jar file )

Time issue

Hi ,

I was looking at your api and i came up with a question.
Let say we want to get /products/{productId}/candles.
It requires the startTime and endTime and that is ok, my question is should i provide this values in which timezone?

Error while extracting response for type [class [Lcom.coinbase.exchange.model.Product;] ... max_market_funds

Error with this mapping. Am planning to change the field type hopefully that solves the issue.

org.springframework.web.client.RestClientException: Error while extracting response for type [class [Lcom.coinbase.exchange.model.Product;] and content type [application/json;charset=utf-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type java.lang.Integer from String "2.0": not a valid Integer value; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type java.lang.Integer from String "2.0": not a valid Integer value
at [Source: (PushbackInputStream); line: 1, column: 2523] (through reference chain: java.lang.Object[][6]->com.coinbase.exchange.model.Product["max_market_funds"])

at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:117)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:994)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:977)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:737)

Deprecated API in OrderTests

src\test\java\com\coinbase\exchange\api\orders\OrderTests.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

Create documentation on how to write tests

I believe adding information how to write tests for the gdax-java library would be useful. This information should be added to the Readme and should help improve any newcomer's understanding of what the repo does and how they can contribute.

Websocket: cannot subscribe with authentication

Hi!

Without authentication, I can subscribe to GDAX Websocket feed (any channel combination).

Instead, if I set my key, passphrase and secret code, then I get the answer:
{"type":"error","message":"Sorry, you could not be authenticated: Bad Request","reason":"invalid signature"}

According to the GDAX api, when specifying channels you must authenticate using the path: "/users/self/verify" (just "/users/self" if you don't specify channels).

However in signObject() on WebsocketFeed.java, the path is "" as you might find on line 198:

jsonObj.setSignature(signature.generate("", "GET", jsonString, timestamp));

I tried to correct the issue (i.e. setting the correct path), with no success.

GDAX credensials generates: forbidden error

every time when I tried to payment via Gdax account it gives me forbidden error:
however I was purchased the licensed too.

after licensed purchase, I try to use java as well python script, but for both GDAX API generate forbidden error 403 error at my side.

please find the below screen short :
https://content.screencast.com/users/Rajesh771986/folders/Jing/media/96165bca-8b6f-4a1c-bd47-4243b5fa04a0/2018-03-06_2016.png

Gdax support team number is also not connecting:
+1 (855) 577-1727

kindly request suggest what should I do?

Split gdax-java into library and client

There are three separate projects within this repo.

  • The library which facilitates connecting to the Coinbase Pro
  • The spring boot application the injects the configuration for each rest api call
  • The order book application that loads market data into a viewable interface

Examples of the WebsocketFeed?

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

Any plans to get this project on Maven Central?

After looking around I can tell this is one of the better Coinbase Pro Java projects out there: well tested, regularly maintained, follows good Git practices. But the jar not being available on Maven Central makes it much more difficult to use this work in other projects. Are there any plans to do that? It would be very nice if I could just put the dependency in my build file, and it would be much appreciated!

Pagination

For accounts orders, fills, deposits, withdrawals and more.

Please make additional data on Limits available

The GET /payment-methods call is returning additional data that is not captured in the Limit object

For Example:
"limits": {
"type": "fiat_account",
"name": "Coinbase Account",
"sell": [

"limits": {
"type": "bank",
"name": "Bank Account",
"buy": [

I created a fix for this in PR #20 commit 1da2556

Package separation

This is a great project and helps me a lot, thank you very much for all your work. Still I would like to make a small proposal: after checking out it is a bit difficult to separate the actuall API packages from your own application. Maybe you can create an com.irufus.gdax.app package and move all the code that is not the actuall api over there? That would be awesome.

Kind regards
Johannes

Getting {"message":"request timestamp expired"} on POST message

Im using the implementation from this code and i on GET requests i get good responses from the API however, when trying to se POST i get that answer
I used the timestamp generation on your code but got and invalid signature response from the API, that's because you are using the getSeconds and they want milis
im unable to figure where exactly the problem here is the relevant code

        System.out.println(jsonOrder);
	CloseableHttpClient client = HttpClientBuilder.create().build();
	HttpPost request = new HttpPost(BASE_URL + "/orders");

	org.joda.time.DateTime now = new org.joda.time.DateTime(); // Default time zone.
	DateTime nowUtc = DateTime.now ( DateTimeZone.UTC );

	String timestamp = now.getMillis() + "";

	request.addHeader("accept", "application/json");
	request.addHeader("content-type", "application/json");
	request.addHeader("User-Agent", "gdax-java-client");
	request.addHeader(CB_ACCESS_KEY, API_KEY);
	request.addHeader(CB_ACCESS_SIGN, generateSignedHeader("/orders", "POST", jsonOrder, timestamp));
	request.addHeader(CB_ACCESS_TIMESTAMP, timestamp);
	request.addHeader(CB_ACCESS_PASSPHRASE, PASSPHRASE);

	HttpResponse response = client.execute(request);
	String jsonResponse = EntityUtils.toString(response.getEntity(), "UTF-8");
	client.close();
	return jsonResponse;`

The generateSignedHeader is your implementation and it is working for GET requests

Gradlew jar. Could not resolve central.maven.org

Hi,
I downloaded the project and tried building the jar. The build fails because it cannot resolve modules because it cannot resolve any maven. I tried it on different computers and had the same error.

SEVERE: CancelAllOrders worked even with a VIEW ONLY API key

Hi,

I downloaded the code, and was running the junit tests locally and encountered an issue with the cancelAllOrders test method. Even though the method failed with the below exception, it still canceled all my existing orders.

At this moment, I only have a View Only API Key. I don't have any API Keys with Trade permissions.

I didnt try running the createOrder test methods for fear of it creating market orders, even with the VIEW only API key. Do please look into this urgently.

Thanks.

Error below:

org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Can not construct instance of com.coinbase.exchange.api.orders.Order: no String-argument constructor/factory method to deserialize from String value ('e7046f48-9c93-4250-9981-be9fd1701c58'); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.coinbase.exchange.api.orders.Order: no String-argument constructor/factory method to deserialize from String value ('e7046f48-9c93-4250-9981-be9fd1701c58')
at [Source: java.io.PushbackInputStream@6fd5717c; line: 1, column: 2] (through reference chain: java.lang.Object[][0])

at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:244)
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.read(AbstractJackson2HttpMessageConverter.java:229)
at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:96)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:917)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:901)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:655)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:559)
at com.coinbase.exchange.api.exchange.GdaxExchangeImpl.delete(GdaxExchangeImpl.java:98)
at com.coinbase.exchange.api.orders.OrderService.cancelAllOpenOrders(OrderService.java:53)
at com.coinbase.exchange.api.orders.OrderTests.cancelAllOrders(OrderTests.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.coinbase.exchange.api.orders.Order: no String-argument constructor/factory method to deserialize from String value ('e7046f48-9c93-4250-9981-be9fd1701c58')
at [Source: java.io.PushbackInputStream@6fd5717c; line: 1, column: 2] (through reference chain: java.lang.Object[][0])
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:270)
at com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:1456)
at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1012)
at com.fasterxml.jackson.databind.deser.ValueInstantiator._createFromStringFallbacks(ValueInstantiator.java:370)
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:315)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromString(BeanDeserializerBase.java:1282)
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:159)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:150)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:196)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:20)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3798)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2922)
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:241)
... 38 more

Change default endpoints

"As part of the rebranding of Coinbase Exchange to GDAX, API endpoints have changed. The old *.exchange.coinbase.com endpoints will continue working until Aug 24th, 2016. For the new endpoints see the documentation

Null Pointer Exception

Hey,

While using your library I noticed a null pointer exception when trying to execute a "AccountService.getAccounts()" method. I've put my secret, API key and passphrase into the application.yml. It seems like the "exchange" variable is null.

By the way: I compiled your library into a .jar file and included it into my personal project. (I checked and can confirm that API key etc. are inside the .jar file)

Any idea on whats going wrong?

Thanks for the library!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.