coinmarketcap-d-api 0.1.1

Dlang wrapper around the https://coinmarketcap.com API


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Coinmarketcap D API

Dlang wrapper around the https://coinmarketcap.com API

Install

$ dub add coinmarketcap-d-api

Usage example

import coinmarketcap_api;
import std.json;

auto cmc = new CoinmarketcapAPI ("api key");

cmc.getMetadata("BTC,ETH"); // resutl string
cmc.getMetadata("BTC", "TRX");
cmc.getMetadata(["BTC", "ETH"]);

cmc.getList(1, 10);
cmc.getList(1, 10, ["EUR", "USD"]);

cmc.getMap("active", 1, 10);
cmc.getMap("active", 1, 2, ["BTC", "ETH"]);

cmc.getQuotes("BTC");
cmc.getQuotes(1);
cmc.getQuotes("BTC,ETH", "EUR");
cmc.getQuotes(["BTC", "ETH"], ["EUR", "USD"]);
cmc.getQuotes(1, ["EUR", "USD"]);
cmc.getQuotes([1, 2], ["EUR", "USD"]);

cmc.getGlobal();
cmc.getGlobal("RUB");
cmc.getGlobal(["USD", "EUR"]);

cmc.getMetadata!JSONValue("BTC,ETH"); // resutl JSONValue
cmc.getList!JSONValue(1, 10);
cmc.getMap!JSONValue("active", 1, 10);
cmc.getQuotes!JSONValue("BTC");
cmc.getGlobal!JSONValue();

Check out the CoinMarketCap API documentation for more information!

API

getList

Get a paginated list of all cryptocurrencies with latest market data

getMetadata

Get static metadata for one or more cryptocurrencies

getMap

Returns a paginated list of all cryptocurrencies by CoinMarketCap ID

getQuotes

Get latest market quote for 1 or more cryptocurrencies

getGlobal

Get global information

License

Apache 2.0

Authors:
  • DarkRiDDeR
Dependencies:
none
Versions:
0.1.1 2019-Feb-11
0.1.0 2019-Feb-10
~master 2019-Feb-11
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 0 downloads total

Score:
0.6
Short URL:
coinmarketcap-d-api.dub.pm