0.1.0 • Published 5 years ago
hs-api-coingecko v0.1.0
hs-api-coingecko
A simple NodeJS Wrapper for CoinGecko API Version 3.
Install
npm install hawooni/hs-api-coingecko
Similar project
Notice
Currently only support these API requests.
- /coins/list
- /coins/markets
- /coins/tickers
- /exchanges/list
- /exchanges/tickers
Initialize
const CoinGecko = require('hs-api-coingecko');
const coinGecko = new CoinGecko();
Disable cache.
coinGecko.api.cache.disable = true;
Store cache to file.
coinGecko.api.cache.dir = './cache/folder';
Example
coinGecko.api.coins.markets('usd').then(function(res) {
console.log(res); // api json response
});
Request with query string option. Refer to CoinGecko API documentation for more detail.
coinGecko.api.coins.markets('usd', {page: 3, per_page: 200}).then(function(res) {
console.log(res); // api json response
});
0.1.0
5 years ago