Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

EricCrosson/coinmarketcap-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coinmarketcap-api

An API for querying coinmarketcap.com

Install

$ npm install coinmarketcap-cli-api

API

getMarkets(currency)

Returns a list maps containing market information by exchange

[
{ Exchange: 'Bitfinex',
  Pair: 'BTC/USD',
  'Volume (%)': '11.10%',
  'Volume (24h)': '$252,068,000',
  Price: '$7078.40' },
{ Exchange: 'bitFlyer',
  Pair: 'BTC/JPY',
  'Volume (%)': '5.99%',
  'Volume (24h)': '$136,021,000',
  Price: '$7175.06' },
  ...
]

getMarketCap(currency)

Returns a map

{
    Symbol: BTC,
    Currency: Bitcoin,
    Market cap: $100,000,000,000
    Market cap rank: 1
}

getAllMarketCaps()

Returns an array

[ { Symbol: 'BTC',
    Currency: 'Bitcoin',
    'Market cap': '$128,982,906,067',
    'Market cap rank': 1 },
  { Symbol: 'ETH',
    Currency: 'Ethereum',
    'Market cap': '$28,878,646,139',
    'Market cap rank': 2 },
    ...
]

Related

License

Apache 2.0 © Eric Crosson