Code Monkey home page Code Monkey logo

arduino-coinmarketcap-api's Introduction

arduino-coinmarketcap-api

A wrapper around the CoinMarketCap.com API for Arduino (supports ESP826 & ESP32).

The CoinMarketCap API can be used to look information on a wide range of crypto currency coins, included Bitcoin and Ethereum (check out the full list on their site).

Usage

The simplest way to see how it works is the check out the example that comes with the library.

GetTickerInfo:

A wrapper around the single ticker endpoint supporting the convert parameter (currency)

Code is as follows:

CMCTickerResponse response = api.GetTickerInfo(ticker, "eur");

Ticker unfortunately is not the symbol for some reason. Go to CoinMarketCap.com and select the coin you would like to check, the ticker name makes up the last part of the URL. e.g: https://coinmarketcap.com/currencies/bitcoin/ , "bitcoin" is the ticker value

Currency is optional, so you can pass only ticker if you want. Check out the currency drop down on CoinMarketCap.com to get available values

The return object has the following values:

struct CMCTickerResponse{
  String id;
  String name;
  String symbol;
  int rank;
  float price_usd;
  float price_btc;
  float volume_usd_24h;
  float market_cap_usd;
  float available_supply;
  float total_supply;

  float percent_change_1h;
  float percent_change_24h;
  float percent_change_7d;
  float last_updated;

  float price_currency;
  float volume_currency_24h;
  float market_cap_currency;

  String error;
};

arduino-coinmarketcap-api's People

Contributors

witnessmenow 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.