Camphul / CoinMarketCap-API

CoinMarketCap API client written in Java(supports CMC API v2)
https://coinmarketcap.com/api
GNU General Public License v3.0
24 stars 14 forks source link

Deprecation notice

This repositories has been inactive for a while and is no longer being maintained.

CoinMarketCap-API

An API implementation written in Java for the CoinMarketCap API.

The library has been updated to work with API v2 from CMC. Please report any issues and/or feature requests here on github.

Installation

I have released this library onto maven central:

<dependency>
    <groupId>com.lucadev</groupId>
    <artifactId>coinmarketcap-api</artifactId>
    <version>2.1</version>
</dependency>

Usage

CoinMarketList coinMarkets  = CoinMarketCap.ticker().setLimit(5).convert(Currency.EUR).get();
coinMarkets.forEach(System.out::println);

//find a market
CoinMarket bitcoinMarket = coinMarkets.getByName("bitcoin");
System.out.println(bitcoinMarket.getUSDPriceQuote().getPrice());

System.out.println("Specific Currency:");

CoinMarket market = CoinMarketCap.ticker(1).get();
System.out.println(market);

System.out.println("Specific currency by market name:");
CoinMarket namedMarket = CoinMarketCap.ticker("bitcoin").get();
System.out.println(namedMarket);

An example implementation can be found in the maven test sources.

License

This project is developed under the GNU GPLv3 license. This license can be found under LICENSE.txt

Changelog

2.1

2.0

1.*

Donations

If you wish to donate to me please use the following addresses: