/cryptos-java

Java wrapper for the Equibles cryptos API.

Primary LanguageJava

Equibles Cryptos API for Java

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.equibles.cryptos</groupId>
  <artifactId>equibles-cryptos</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.equibles.cryptos:equibles-cryptos:1.0.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/equibles-cryptos-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import com.equibles.cryptos.*;
import com.equibles.cryptos.auth.*;
import com.equibles.cryptos.models.*;
import com.equibles.cryptos.api.CryptosApi;

import java.io.File;
import java.util.*;

public class CryptosApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Query String
        ApiKeyAuth Query String = (ApiKeyAuth) defaultClient.getAuthentication("Query String");
        Query String.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Query String.setApiKeyPrefix("Token");

        CryptosApi apiInstance = new CryptosApi();
        Integer page = 1; // Integer | The number of the page to request.
        Integer pageSize = 100; // Integer | The number of elements in each page. Max value: 100.
        try {
            CryptoCurrencyProfilesResponse result = apiInstance.list(page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CryptosApi#list");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.equibles.com

Class Method HTTP request Description
CryptosApi list GET /cryptos/list Get a list of all the available crytocurrencies.
CryptosApi profile GET /cryptos/profile The profile of this cryptocurrency.
PricesApi endOfDay GET /cryptos/prices/endofday Lists the end of day prices for a given cryptocurrency.
PricesApi intraday GET /cryptos/prices/intraday Lists the intraday prices for a given cryptocurrency with one minute precision.

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

Query String

  • Type: API key
  • API key parameter name: ApiKey
  • Location: URL query string

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

Equibles
equibles@gmail.com