Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coinmarketcap-fetch

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coinmarketcap-fetch

CoinMarketCap API

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

coinmarketcap

NPM Package Build Status

js-standard-style

API

ticker([options])

Get a list of assets and their info.

  • options (Object) Optional.
    • limit (Number) Only return the top limit assets. Default is to get all assets.
    • convert (String) Return price, 24h volume, and market cap in terms of another currency.

Returns a promise.

Example:

await coinmarketcap.ticker({
  limit: 10,
  convert: 'eur'
})
// [
//     {
//         "id": "bitcoin",
//         "name": "Bitcoin",
//         "symbol": "BTC",
//         "rank": "1",
//         "price_usd": "1030.06",
//         "price_btc": "1.0",
//         "24h_volume_usd": "321117000.0",
//         "market_cap_usd": "16733968488.0",
//         "available_supply": "16245625.0",
//         "total_supply": "16245625.0",
//         "percent_change_1h": "0.52",
//         "percent_change_24h": "-1.01",
//         "percent_change_7d": "-1.77",
//         "last_updated": "1490895549",
//         "price_eur": "960.3403889",
//         "volume_eur": "299382195.855",
//         "market_cap_eur": "15601329830.0"
//     },
//     ... (9 more)
// ]

tickerByAsset(assetID, [options])

Get info about a particular asset.

  • assetID (String) Asset ID (i.e 'bitcoin')
  • options (Object) Optional.
    • convert (String) Return price, 24h volume, and market cap in terms of another currency.

Returns a promise.

Example:

await coinmarketcap.tickerByAsset('bitcoin', { convert: 'eur' })
// {
//     "id": "bitcoin",
//     "name": "Bitcoin",
//     "symbol": "BTC",
//     "rank": "1",
//     "price_usd": "1030.06",
//     "price_btc": "1.0",
//     "24h_volume_usd": "321117000.0",
//     "market_cap_usd": "16733968488.0",
//     "available_supply": "16245625.0",
//     "total_supply": "16245625.0",
//     "percent_change_1h": "0.52",
//     "percent_change_24h": "-1.01",
//     "percent_change_7d": "-1.77",
//     "last_updated": "1490895549",
//     "price_eur": "960.3403889",
//     "volume_eur": "299382195.855",
//     "market_cap_eur": "15601329830.0"
// }

global([options])

Get global info.

  • options (Object) Optional.
    • convert (String) Return 24h volume, and market cap in terms of another currency.

Returns a promise.

Example:

await coinmarketcap.ticker()
// {
//     "total_market_cap_usd": 24854674203.0,
//     "total_24h_volume_usd": 694102237.0,
//     "bitcoin_percentage_of_market_cap": 67.33,
//     "active_currencies": 680,
//     "active_assets": 80,
//     "active_markets": 2817
// }

License

MIT

FAQs

Package last updated on 07 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc