1.0.4 • Published 7 years ago

coinage-lib v1.0.4

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
7 years ago

Coinage

npm version

A cryptocurrency coin aggregator library

coin·age, noun. def: coins collectively.

API Reference

Getting Started

const Coinage = require('coinage-lib');

Coinage.getCoins().then((response) => { ... }).catch((error) => { ... });

Methods

Coinage.getCoins()

Returns promise that resolves with an array of coin symbols.

Coinage.getHistory(coin, type, period)

Returns a promise that resolves with coin history data.

ArgumentDescription
coinA coin symbol. E.g., 'ETH'
typeOptional. Specify either 'market_cap', 'price', or 'volume' to receive an array of historical data. If omitted, an object containing all three types will be returned.
periodOptional. Specify either '1day', '7day', '30day', '90day', '180day', or '365day'.

Coinage.getTickers(coins, currency)

Returns a promise that resolves with ticker data for the given coins.

ArgumentDescription
coinsAn array of symbols (e.g., ['ETH', 'BTC']) to return ticker data for. Leave empty array to return all coins.
currencyThe currency to use. Defaults to 'USD'.
limitThe number of results to return. Set to 0 for all results. Defaults to 100.

Copyright © 2017 Polyledger. All rights reserved.

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago