1.0.0 • Published 3 years ago

cardano-stat v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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...

const cardano = require('cardano-stat')

console.log(cardano)
//output shoule be something similar to this
/*
{
  price: '$1.49',
  '24h_change': '8.01',
  market_cap: '$47.93B',
  '24h_volume': '$2.11B',
  '24h_low': '$1.37',
  '24h_high': '$1.49',
  net_change: '$0.109957',
  '24h_open': '$1.37',
  all_time_high: '$2.47',
  total_supply: '32.27B',
  '24h_returns': '8.01',
  ytd_returns: '717.26',
  '30d_volatility': '0.60',
  '24h_transaction_count': '31,500',
  '24h_average_transaction_fee': '$0.299762',
  '24h_value_transacted': '$2.22B'
}
*/

console.log(cardano.price) //output - $1.49
console.log(cardano['24h_change']) //output - 8.01
console.log(cardano.market_cap) //output - $47.93B
console.log(cardano['24h_volume']) //output - $2.11B
console.log(cardano['24h_low']) //output - $1.37
console.log(cardano['24h_high']) //output - $1.49
console.log(cardano.net_change) //output - $0.109957
console.log(cardano['24h_open']) //output - $1.37
console.log(cardano.all_time_high) //output - $2.47
console.log(cardano.total_supply) //output - 32.27B
console.log(cardano['24h_returns']) //output - 8.01
console.log(cardano.ytd_returns) //output - 717.26
console.log(cardano['30d_volatility']) //output - 0.60
console.log(cardano['24h_transaction_count']) //output - 31,500
console.log(cardano['24h_average_transaction_fee']) //output - $0.299762
console.log(cardano['24h_value_transacted']) //output - $2.22B