worldcoinindex-api
WorldCoinIndex API Wrapper for Node.js
Last updated 2 years ago by abhinavk99 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install worldcoinindex-api 
SYNC missed versions from official npm registry.

worldcoinindex-api

Simple WorldCoinIndex API wrapper for Node.js

WorldCoinIndex API documentation can be found at https://www.worldcoinindex.com/apiservice

Installation

npm install worldcoinindex-api

Usage

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);

Tests

npm test

API

Table of Contents

constructor

Creates an instance of WorldCoinIndex

Parameters

  • key string WorldCoinIndex API key

Examples

const client = new WorldCoinIndex('toe48ute93m34notarealkey');

getTicker

Get ticker information

Parameters

  • ticker string currency ticker
  • fiat string currency being traded with

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

getTickers

Get information on multiple tickers

Parameters

  • tickers Array<string> list of currency tickers
  • fiat string currency being traded with

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

getMarkets

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

Contributing

Contributions welcome!

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

2 Versions

  • 1.0.0                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 6
Dependencies (1)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |