This library provides convenient way to use Coinpaprika.com API in NodeJS.
Coinpaprika delivers full market data to the world of crypto: coin prices, volumes, market caps, ATHs, return rates and more.
npm install @coinpaprika/api-nodejs-clientconst CoinpaprikaAPI = require('@coinpaprika/api-nodejs-client');
const client = new CoinpaprikaAPI();
client.getTicker().then(console.log).catch(console.error);
client.getGlobal().then(console.log).catch(console.error);Check out the Coinpaprika API documentation for more information!
Get global information
const client = new CoinpaprikaAPI();
client.getGlobal().then(console.log).catch(console.error);Get a list of all cryptocurrencies available on coinpaprika.com.
const client = new CoinpaprikaAPI();
client.getCoins().then(console.log).catch(console.error);Get the OHLCV historical for a coin
const client = new CoinpaprikaAPI()
client.getCoinsOHLCVHistorical({
coinId: "btc-bitcoin",
quote: "usd",
start: "2020-01-01",
end: "2020-01-02"
}).then(console.log).catch(console.error)(DEPRECATED) Get information on all tickers or specifed ticker.
args(optional, default{})optionsObject Options for the requestoptions.coinIdString Coinpaprika ID fromgetCoins()(optional, default ``)
const client = new CoinpaprikaAPI();
client.getTicker().then(console.log).catch(console.error);
client.getTicker({coinId: 'btc-bitcoin'}).then(console.log).catch(console.error);Get tickers for all coins
params(optional, default{})coinIdstring (optional butrequiredwith historical key)quotesarray of strings (optional)historicalobject (optional)- start: string (required)
- end: string (optional)
- limit: integer (optional)
- quote: string (optional)
- interval: string (optional)
const client = new CoinpaprikaAPI()
client.getAllTickers({
coinId:'btc-bitcoin',
quotes: ['BTC', 'ETH']
}).then(console.log).catch(console.error)
client.getAllTickers({
coinId:'btc-bitcoin',
historical: {
start: '2018-02-15',
end: '2018-02-16',
limit: 2000,
quote: 'btc',
interval: '30m'
}
}).then(console.log).catch(console.error)CoinpaprikaAPI is available under the MIT license. See the LICENSE file for more info.