node-coinmarketcap
A node module to connect to CoinMarketCap API and retrieve prices and statistics of cryptocurrencies.
It supports events to get alerts on price status.
Installation
$ npm install node-coinmarketcap
Usage Example
var CoinMarketCap = ;var coinmarketcap = ;// If you want to check a single coin, use get() (You need to supply the coinmarketcap id of the cryptocurrency, not the symbol)// If you want to use symbols instead of id, use multi.coinmarketcap;// If you want to check multiple coins, use multi():coinmarketcap;
Usage Example with Events
var CoinMarketCap = ; var options = events: true // Enable event system refresh: 60 // Refresh time in seconds (Default: 60) convert: "EUR" // Convert price to different currencies. (Default USD)var coinmarketcap = options; // Trigger this event when BTC price is greater than 4000coinmarketcap; // Trigger this event when BTC percent change is greater than 20coinmarketcap; // Trigger this event every 60 seconds with information about BTCcoinmarketcap;
For a full list of examples with events, visit: https://github.com/Aex12/node-coinmarketcap/blob/master/example.js