Class JCoinbaseClient

java.lang.Object
com.github.badpop.jcoinbase.JCoinbaseClient

public class JCoinbaseClient
extends java.lang.Object
The JCoinbaseClient class is the main class of JCoinbase. JCoinbaseClient allows you make requests to the Coinbase API in a fluent and simple way using it's api.

To build a new JCoinbaseClient object you should use the JCoinbaseClientFactory

Make request to Coinbase api using these methods :

  • Constructor Summary

    Constructors
    Constructor Description
    JCoinbaseClient()  
  • Method Summary

    Modifier and Type Method Description
    AccountService account()
    This method provides an AccountService allowing you to request coinbase protected data using it's api
    protected JCoinbaseClient build​(java.lang.String apiKey, java.lang.String secret, java.lang.String apiVersion, long timeout, boolean threadSafe)
    This protected method build a new JCoinbaseClient with the given parameters
    DataService data()
    This method provides a DataService allowing you to request coinbase public data using it's api
    UserService user()
    This method provides a UserService allowing you to request coinbase protected data using it's api

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JCoinbaseClient

      public JCoinbaseClient()
  • Method Details

    • data

      public DataService data()
      This method provides a DataService allowing you to request coinbase public data using it's api
      Returns:
      a DataService
    • user

      public UserService user()
      This method provides a UserService allowing you to request coinbase protected data using it's api

      Warning : this method throws an InvalidApiKeyAndSecretException if you don't properly build your JCoinbaseClient by providing your api key and secret

      Returns:
      a UserService
    • account

      public AccountService account()
      This method provides an AccountService allowing you to request coinbase protected data using it's api

      Warning : this method throws an InvalidApiKeyAndSecretException if you don't properly build your JCoinbaseClient by providing your api key and secret

      Returns:
      an AccountService
    • build

      protected JCoinbaseClient build​(java.lang.String apiKey, java.lang.String secret, java.lang.String apiVersion, long timeout, boolean threadSafe)
      This protected method build a new JCoinbaseClient with the given parameters
      Parameters:
      apiKey - the coinbase api key
      secret - the coinbase api secret
      apiVersion - the coinbase api version
      timeout - the wanted timeout for http requests
      threadSafe - a boolean defining if the instance should be a thread safe singleton
      Returns:
      a JCoinbaseClient