Skip to content

coinbase-samples/intx-sdk-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coinbase International Exchange (INTX) Java SDK README

Overview

The INTX Java SDK is a sample library that demonstrates the structure of a Coinbase International Exchange (INTX) driver for the REST APIs.

License

The INTX Java SDK sample library is free and open source and released under the Apache License, Version 2.0.

The application and code are only available for demonstration purposes.

Usage

To use the INTX Java SDK, initialize the Credentials class and create a new client. The Credentials struct is JSON enabled. See an example of this inside of the examples package. Ensure that INTX API credentials are stored in a secure manner.

The JSON format expected for INTX_CREDENTIALS is:

{
  "accessKey": "",
  "passphrase": "",
  "signingKey": "",
  "portfolioId": ""
}

Coinbase INTX API credentials can be created in the INTX web console under API on the left-hand panel.

Once the client is initialized, make the desired call. For example, to , pass in the request object, check for an error, and if nil, process the response.

The client and request objects use the builder pattern, which provides a flexible way to construct objects with optional parameters. For example, in the list portfolio balances request, you can set only the parameters you need using the builder.

To make API calls, create a request object using the builder pattern, call the desired method on the client with the request object and then process and print the response. See an example of this inside of the examples package.

Binaries

Binaries and dependency information for Maven, Gradle, Ivy and others can be found at the Maven Central Repository

Maven example:

<dependency>
    <groupId>com.coinbase.intx</groupId>
    <artifactId>coinbase-intx-sdk-java</artifactId>
    <version>x.y.z</version>
</dependency>

Build

To build the sample library, ensure that Java Development Kit (JDK) is installed and then run:

mvn clean install