Skip to content

A simple Node.js project that creates endpoints for the circulating supply and the total supply using the Cosmos SDK API. Useful for platforms like CoinMarketCap or CoinGecko.

License

Notifications You must be signed in to change notification settings

zenodeapp/cosmos-supply-endpoints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cosmos Supply Endpoints

A simple Node.js project that creates endpoints for the circulating supply and the total supply using the Cosmos SDK API. Useful for platforms like CoinMarketCap or CoinGecko.

This has been written by ZENODE and is licensed under the MIT-license (see LICENSE).

Installation (Local)

  1. First create an .env file in the root of the repository.
  2. Copy and paste the content of the .env.example into the .env file.
  3. Change the API_ENDPOINT to one that is up-to-date and stable (no trailing slash!).
  4. Change the COIN_DENOM Make sure to use the correct denominator for COIN_DENOM. It is usually the smallest denom.
  5. Change the COIN_DECIMALS to make sure your end result gets shown in the right amount of decimals. Defaults to 1, which leaves the API results as is.
  6. Run npm install.
  7. Turn on the server by running npm start.
  8. Once the server is started, browse to the endpoints localhost:3000/total-supply and localhost:3000/circulating-supply to see the outcomes.

Important

LOGIC: Total Supply - Community Pool = Circulating Supply.

The logic or API may not match with your chain, so make the necessary changes if the outcome appears to be incorrect or invalid.


— ZEN

Copyright (c) 2023 ZENODE

About

A simple Node.js project that creates endpoints for the circulating supply and the total supply using the Cosmos SDK API. Useful for platforms like CoinMarketCap or CoinGecko.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published