Simple WorldCoinIndex API wrapper for Node.js
WorldCoinIndex API documentation can be found at https://www.worldcoinindex.com/apiservice
npm install worldcoinindex-api
const WorldCoinIndex = require('worldcoinindex-api');
const client = new WorldCoinIndex('your key goes here');
client.getTicker('eth', 'btc').then(console.log).catch(console.error);
client.getTickers(['eth', 'ltc'], 'btc').then(console.log).catch(console.error);
client.getMarkets('btc').then(console.log).catch(console.error);
npm test
Creates an instance of WorldCoinIndex
Parameters
key
string WorldCoinIndex API key
Examples
const client = new WorldCoinIndex('toe48ute93m34notarealkey');
Get ticker information
Parameters
Examples
const client = new WorldCoinIndex('key goes here');
client.getTicker('eth', 'btc').then(console.log).catch(console.error);
client.getTicker('ltc', 'btc').then(console.log).catch(console.error);
Returns Object ticker information
Get information on multiple tickers
Parameters
Examples
const client = new WorldCoinIndex('key goes here');
client.getTickers(['eth', 'ltc'], 'btc').then(console.log).catch(console.error);
client.getTickers(['ven'], 'btc').then(console.log).catch(console.error);
Returns Object information on multiple tickers
Get market information
Parameters
fiat
string currency to get information about
Examples
const client = new WorldCoinIndex('key goes here');
client.getTicker('btc').then(console.log).catch(console.error);
client.getTicker('eth').then(console.log).catch(console.error);
Returns Object market information
Contributions welcome!