Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Josh-McFarlin/CryptoCompareAPI

Java implementation of the CryptoCompare API service
https://github.com/Josh-McFarlin/CryptoCompareAPI

api-client bitcoin cryptocompare-api cryptocurrency ethereum

Last synced: about 2 months ago
JSON representation

Java implementation of the CryptoCompare API service

Awesome Lists containing this project

README

        

# CryptoCompareAPI
A Java implementation of the [CryptoCompare API service.](https://min-api.cryptocompare.com/)

## Download

[![Release](https://jitpack.io/v/me.joshmcfarlin/CryptoCompareAPI.svg)](https://jitpack.io/#me.joshmcfarlin/CryptoCompareAPI)

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

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

#### Maven
```xml


jitpack.io
https://jitpack.io

```
```xml

me.joshmcfarlin
CryptoCompareAPI
master-SNAPSHOT

```

## Usage
```java
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 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/](https://joshmcfarlin.me/CryptoCompareAPI/)

## License
This project is developed under the MIT license. This can be found at [LICENSE](LICENSE).