Skip to content

faisalferoz/CryptoCompareAPI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CryptoCompareAPI

A Java implementation of the CryptoCompare API service.

Download

Release

Gradle

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
        implementation 'me.joshmcfarlin:CryptoCompareAPI:master-SNAPSHOT'
}

Maven

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependency>
    <groupId>me.joshmcfarlin</groupId>
    <artifactId>CryptoCompareAPI</artifactId>
    <version>master-SNAPSHOT</version>
</dependency>

Usage

public class Test {
    private CryptoCompareAPI api = new CryptoCompareAPI();
    
    public static void main(String[] args) {
        double dayAverage = api.historic.getDayAverage("BTC", "USD");
        System.out.println("Bitcoin day average:");
        System.out.println(dayAverage);

        Market.ExchangeAverage exchangeAverage = api.market.getExchangeAverage("BTC", "USD", "Coinbase,Kraken,Bitstamp");
        System.out.println("Bitcoin average from Coinbase, Kraken, and Bitstamp:");
        System.out.println(exchangeAverage.getHigh24Hour());

        Map<String, Double> btcPrice = api.market.getPrice("BTC", "USD,EUR");
        System.out.println("Bitcoin price in USD and EUR:");
        System.out.println(btcPrice);
    }
}

An example is provided in the test sources.

Documentation

Documentation is provided at https://joshmcfarlin.me/CryptoCompareAPI/

License

This project is developed under the MIT license. This can be found at LICENSE.

About

Java implementation of the CryptoCompare API service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%