npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cmc-info

v1.3.4

Published

CoinMarketCap pro API interface

Downloads

30

Readme

CoinMarketCap API interface (cmc-info)

Simple API interface for CoinMarketCap's pro API. Requests are asynchronous and use promises. For simpler implementation, the request-promise module is used.

Installation & use

npm i cmc-info

How to use in your code: see example.

For getting multiple values at the same time, use options none or 'quote', this way you only need 1 API call for all values. For getting single values, you can use my pre-made function options. See usage below.

API key

You can register and get a free API key here. There are also paid options for more advanced and commercial use. Set your key in cmc-api.js.

requestCoin argument options:

  • none
{ 
  	id: 1,
  	name: 'Bitcoin',
  	symbol: 'BTC',
  	slug: 'bitcoin',
  	circulating_supply: 17548650,
  	total_supply: 17548650,
  	max_supply: 21000000,
  	date_added: '2013-04-28T00:00:00.000Z',
  	num_market_pairs: 6643,
  	tags: [ 'mineable' ],
  	platform: null,
  	cmc_rank: 1,
  	last_updated: '2019-02-20T14:25:27.000Z',
  	quote:
  		{ USD:
  			{ 	price: 3967.45596071,
  				volume_24h: 8870574483.8468,
  				percent_change_1h: -0.558352,
  				percent_change_24h: -0.290679,
  				percent_change_7d: 9.24773,
  				market_cap: 69623496044.91354,
  				last_updated: '2019-02-20T14:25:27.000Z'
  			}
  		} 
}
  • quote
 { 
		price: 3968.8811105,
		volume_24h: 8872096540.73199,
		percent_change_1h: -0.522632,
		percent_change_24h: -0.254862,
		percent_change_7d: 9.28697,
		market_cap: 69648505499.77582,
		last_updated: '2019-02-20T14:24:26.000Z'
 }
  • id
  • name
  • symbol
  • slug
  • circulating_supply
  • total_supply
  • max_supply
  • date_added
  • num_market_pairs
  • tags
  • platform
  • cmc_rank
  • last_updated
  • price
  • volume_24h
  • percent_change_1h
  • percent_change_24h
  • percent_change_7d
  • market_cap