npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@luxlhm/crypto_alternative

v1.1.1

Published

CryptoAlternative package enable us to use cyrpto [Alternative API](https://alternative.me/) with functionnal programmation. You can use these functions to acces to the API : - [GetTicker](#getticker) - [GetTickerSpecificCurrency](#gettickerspecificcur

Downloads

4

Readme

CryptoAlternative

CryptoAlternative package enable us to use cyrpto Alternative API with functionnal programmation. You can use these functions to acces to the API :

How use CryptoAlternative ?

To begin, install the npm package with the command :


npm i @luxlhm/crypto_alternative

GetTicker

Get coin prices updated every 5 minutes

Example :

 const crypto = require('@luxlhm/crypto_alternative')
 
 crypto.GetTicker().then(data => console.log(data))
 // or
 crypto.GetTicker({limit: 2,convert: 'EUR'}).then(data => console.log(data))

Optional parameters :

{
    limit?:Number;
    start?:Number;
    convert?:'USD'|'EUR'|'GBP'|'RUB'|'JPY'|'CAD'|'KRW'|'PLN';
    structure?:'string'|'dictionnary'|'array';
    sort?:'id'|'rank'|'volume_24h'|'percent_change_24h'|'price'|'percent_change_1h'|'percent_change_1h'|'percent_change_7d'|'circulating_supply'|'name';
}

GetTickerSpecificCurrency

Get ticker data of a specified coin by providing the 'id' or the 'website_slug' of the coin, for example id of bitcoin is 1 and its 'website_slug' is 'bitcoin'.

Example :

 const crypto = require('@luxlhm/crypto_alternative')
  
 crypto.GetTickerSpecificCurrency('bitcoin').then(data => console.log(data))
 // or 
 crypto.GetTickerSpecificCurrency(1).then(data => console.log(data)) 

Parameters :

{
  id:Numer|String;
}

GetGlobal

Get global market information at a glance.

Example :

 const crypto = require('@luxlhm/crypto_alternative')
  
 crypto.GetBlobal().then(data => console.log(data))
 // or 
 crypto.GetBlobal({convert:'EUR'}).then(data => console.log(data)) 

Optional parameters :

{
    convert? :'USD'|'EUR'|'GBP'|'RUB'|'JPY'|'CAD'|'KRW'|'PLN';
}

GetFearIndex

Get the latest data of the Fear and Greed Index. Fear index represent the atmosphere of the day in the crypto sphere. This data is between 0 and 100.

Example :

 const crypto = require('@luxlhm/crypto_alternative')
 
 crypto.GetFearIndex().then(data => console.log(data))
 // or
 crypto.GetFearIndex({limit:2, date_format:'world', format:'json'}).then(data => console.log(data)) 

Optional parameters :

{
    limit?:number;
    format?: 'csv'|'json';
    date_format?: 'us'|'cn'|'kr'|'world'
}

GetFearIndexPhoto

Get the latest png graph of fear index. Graph example :

Example :

 const crypto = require('@luxlhm/crypto_alternative')
  
 crypto.GetFearIndexPhoto({name:'monday_fearindex'}).then(data => console.log(data))
 // or
 crypto.GetFearIndexPhoto({name:'monday_fearindex', RelativePath:'/PhotoDist'}).then(data => console.log(data))

Parameters and optional parameters :

{
    name:string;
    RelativePath?:string;
}

GetFearIndexPhotoDate

As before, with this function we can get the latest png graph of fear index, but the graph of an accurate day.

Example :

 const crypto = require('@luxlhm/crypto_alternative')
  
 crypto.GetFearIndexPhotoDate({name:'monday_fearindex',date:{day:20,month:3, year:2021}}).then(data => console.log(data))
 // or
 crypto.GetFearIndexPhotoDate({name:'monday_fearindex', RelativePath:'/PhotoDist', date:{day:20,month:3, year:2021}}).then(data => console.log(data)) 

Parameters and optional parameters :

{
    name:string;
    date:{
        day:number;
        month:number;
        year:number;
    }
    RelativePath?:string;
}

Sources

Official crypto alternative documentation.