Package com.github.badpop.jcoinbase
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 anAccountService
allowing you to request coinbase protected data using it's apiprotected 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 parametersDataService
data()
This method provides aDataService
allowing you to request coinbase public data using it's apiUserService
user()
This method provides aUserService
allowing you to request coinbase protected data using it's apiMethods 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
This method provides aDataService
allowing you to request coinbase public data using it's api- Returns:
- a
DataService
-
user
This method provides aUserService
allowing you to request coinbase protected data using it's apiWarning : this method throws an
InvalidApiKeyAndSecretException
if you don't properly build your JCoinbaseClient by providing your api key and secret- Returns:
- a
UserService
-
account
This method provides anAccountService
allowing you to request coinbase protected data using it's apiWarning : 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 keysecret
- the coinbase api secretapiVersion
- the coinbase api versiontimeout
- the wanted timeout for http requeststhreadSafe
- a boolean defining if the instance should be a thread safe singleton- Returns:
- a
JCoinbaseClient
-