Skip to content

Latest commit

 

History

History
92 lines (65 loc) · 2.62 KB

README.src.md

File metadata and controls

92 lines (65 loc) · 2.62 KB

Cryptocurrency circulating, available and total supplies

This is a project meant to keep track of crypto coin supply data and in a normalized format, hoping to generate community interest and involvement.

The end goal is to have a more transparent and up to date source than what's out there on the web right now.

As such, please help out by submitting a pull request with your favorite coin(s) to track.

Contributing

  1. Fork the project
  2. Work on integrating your favorite coins
  3. Create a pull request back to the original project

Please submit ATOMIC EDITS, one pull request per one coin, do not mix them.

Payload structure

Implemented coins should return an object via callback() with the following keys:

  • c representing the Circulating Supply
  • t representing the Total Supply
  • m representing the Max Supply

How to run all coins available

  1. Clone or download the repository
  2. Run npm install
  3. Run node supplies.js get-all

How to run an individual coin

  1. Clone or download the repository
  2. Run npm install
  3. Run node supplies.js get bitcoin

Caching

This package uses a file-based cache with a default time to live (TTL) of 10 minutes.

You can optionally pass an argument to override the TTL via --cacheTTL 10 for 10 seconds for example.

Optional flags

  • --help displays available commands and flags
  • --pretty a boolean flag with no arguments, pretty prints output
  • --only-implemented a boolean flag with no arguments, only displays implemented coins
  • --cacheTTL 10 an integer flag with one argument, the number of seconds to cache responses

Sample basic output

> ./supplies.js get-all --only-implemented

{"c":31112484646,"t":31112484646,"m":45000000000,"id":"cardano"}
{"c":65000000,"t":100000000,"m":100000000,"id":"neo"}
{"c":56560358.23095151,"t":56560358.23095151,"m":84000000,"id":"litecoin"}
{"c":8073689.96392729,"t":8073689.96392729,"m":18900000,"id":"dash"}
{"c":35017498.50875262,"id":"pivx"}
{"c":98857486.20226616,"id":"stratis"}
{"c":10258708190.732668,"m":21000000000,"id":"digibyte"}
{"c":16036035.28,"id":"monero"}
{"c":99992204718.08847,"t":99992434971,"m":100000000000,"id":"ripple"}
{"c":99461419.46,"id":"ethereum"}
{"c":7583686.03269673,"t":7583686.03269673,"id":"bulwark"}

Sample pretty output

> ./supplies.js get-all --only-implemented --pretty

cardano
|-- Circulating: 31112484646
|-- Total: 31112484646
|-- Max: 45000000000

neo
|-- Circulating: 65000000
|-- Total: 100000000
|-- Max: 100000000

bitcoin
|-- Circulating: 17033525
|-- Total: 21000000
|-- Max: N/A

litecoin
|-- Circulating: 56560408.23095151
|-- Total: 56560408.23095151
|-- Max: 84000000