Skip to content

elyrko/Coins

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coins

Build Status Dependency Status

Cryptocurrency Price REST API written in Node.js. Data is scraped from CoinMarketCap.

Note: This is an unofficial API and is not supported or controlled by CoinMarketCap itself. Any questions, comments, feedback or feature requests should be directed to xasos or via an issue in this repo.

Usage

Base URL: http://coins-api.herokuapp.com

Output: JSON

Get All Coin Prices

Get price information about all coins.

GET /coins

Example Query:

http://coins-api.herokuapp.com/coins

Response:

  {
    "name": "bitcoin",
    "position": "1",
    "price": "356.51",
    "marketCap": "4847623128",
    "ticker": "BTC",
    "volume": "29824000",
    "delta24hr": "2.37",
    "timestamp": 1418325595612,
    "currency": "usd"
  },
  {
    "name": "ripple",
    "position": "2",
    "price": "0.016374",
    "marketCap": "505654484",
    "ticker": "XRP",
    "volume": "1620910",
    "delta24hr": "6.48",
    "timestamp": 1418325595612,
    "currency": "usd"
  },
  ...
  ...

Get Individual Coin Prices

Get information about individual coins.

GET /coins/:ticker

Example Query:

http://coins-api.herokuapp.com/coins/btc

Response:

  {
    "name": "bitcoin",
    "position": "1",
    "price": "356.51",
    "marketCap": "4847623128",
    "ticker": "BTC",
    "volume": "29824000",
    "delta24hr": "2.37",
    "timestamp": 1418325595612,
    "currency": "usd"
  }

Get Price in Other Currencies

GET /coins/:ticker/price/:currency

Example Query:

http://coins-api.herokuapp.com/coins/btc/price/chf

Response:

{
  "price": "368.25",
  "currency": "chf"
}

Run Locally

$ npm install
$ node app.js

Deploy to Heroku

$ npm install
$ heroku create
$ (git add, git commit)
$ git push heroku master

Credits

All the data was scraped from CoinMarketCap. The currency converter uses the The Free Currency Converter API. Additionally, this API documentation is modeled off the wonderful API documentation for Hook by @karan.

License

MIT License

About

Cryptocurrency Price REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%