Cardano Stat
About
Cardano Stat is a library that gives current statistics about cardano through my backend api that I made that recieves data from Coindesk, so essentially, this library is an api wrapper of my api that I made. All of the data comes completely from Coindesk and can be found here (https://www.coindesk.com/price/cardano).
Usage
First and foremost, install Cardano Stat using npm like so
$ npm i cardano-stat
Then, once you have done that, require it in your code
const cardano = require('cardano-stat')
The cardano constant will give you an object with (current) information on the following...
- Current Price
- 24 Hour Percent Change
- Market Cap
- 24 Hour Volume
- 24 Hour Low
- 24 Hour High
- Net Change
- 24 Hour Open
- All Time High
- Total Supply
- 24 Hour Returns
- YTD Returns
- 30 Day Volatility
- 24 Hour Transaction Count
- 24 Hour Average Transaction Fee
- 24 Hour Value Transacted
Here is a quick final example of how to use the library in all its glory.
const cardano = require('cardano-stat')
console.log(cardano)
console.log(cardano.price)
console.log(cardano['24h_change'])
console.log(cardano.market_cap)
console.log(cardano['24h_volume'])
console.log(cardano['24h_low'])
console.log(cardano['24h_high'])
console.log(cardano.net_change)
console.log(cardano['24h_open'])
console.log(cardano.all_time_high)
console.log(cardano.total_supply)
console.log(cardano['24h_returns'])
console.log(cardano.ytd_returns)
console.log(cardano['30d_volatility'])
console.log(cardano['24h_transaction_count'])
console.log(cardano['24h_average_transaction_fee'])
console.log(cardano['24h_value_transacted'])