Giter Site home page Giter Site logo

coinmarketcap-java-api-wrapper's Introduction

CoinMarketCap Java API Wrapper

A simple Java library that allows you to access the CoinMarketCap API for checking cryptocurrency information. Useful for Java developers looking to develop a cryptocurrency monitoring application!

Installation

There are three ways to download this library. You can automatically download it through maven (easiest), download the jar, or install/compile it yourself.

For maven, add this dependency to your pom.xml file:

<dependency>
    <groupId>com.github.Draylar</groupId>
    <artifactId>CMC_APIWrapper</artifactId>
    <version>2.0.0</version>
    <classifier>jar-with-dependencies</classifier>
</dependency>

To install it as a jar file, check out the jar release page here. Jars are released more than the maven dependencies and may include bug fixes/new features faster, but also require you to add it to your project yourself.

Basic Usage

To use the API wrapper, first import the library after you have downloaded it like so:

import com.github.Draylar.CMC_APIWrapper;

Now you'll need to create a CMC_APIWrapper object. For an example:

CMC_APIWrapper api = new CMC_APIWrapper();

This object will handle all of your requests.

Let's try to get some information about Bitcoin:

api.getCurrency("bitcoin");

The response:

[
    {
        "id": "bitcoin", 
        "name": "Bitcoin", 
        "symbol": "BTC", 
        "rank": "1", 
        "price_usd": "4567.7", 
        "price_btc": "1.0", 
        "24h_volume_usd": "1449190000.0", 
        "market_cap_usd": "75881085255.0", 
        "available_supply": "16612537.0", 
        "total_supply": "16612537.0", 
        "percent_change_1h": "-0.61", 
        "percent_change_24h": "2.78", 
        "percent_change_7d": "3.06", 
        "last_updated": "1507532654"
    }
]

And there we go! To see more, visit the wiki.

coinmarketcap-java-api-wrapper's People

Contributors

draylar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.