stock-crypto-monitor
Continuously monitors cryptocurrency and stock prices and the total market cap. Currently, the prices are fetched from CoinGecko and Yahoo Finance.
This is a general purpose package, but it is ideal for Termux in Android to continuously show the price of cryptocurrencies in the notification area. See examples/termux.js
- Supports more than 5000 cryptocurrencies
- Supports all stock tickers on Yahoo Finance
- Continuously displays the prices and total market cap
- Accepts callbacks for each time the price is updated
Installation
npm install stock-crypto-monitor --save
Screenshot
Termux (Android)
Usage
Simple
const stock_crypto_monitor = cryptosOfInterest: "BTC,ETH,LTC" stocksOfInterest: "AAPL" "GOOGL";stock_crypto_monitorstart;
Query prices
const crypto_price_checker = cryptosOfInterest: "BTC" "ETH" "LTC" stocksOfInterest: "AAPL" "GOOGL" updateIntervalInSeconds: 10; { await crypto_price_checkerstart; // Prices are now available let c = crypto_price_checker; crypto_price_checker;} ;
Other options
var stock_crypto_monitor = getCoinGeckoPrices: true getStockPricesFromYahoo: true initialCallback: null // Function called in the beginning updateValuesCallback: null // Function called at each updated cryptosOfInterest: `BTC` `ETH` `LTC` stocksOfInterest: "AAPL" "GOOGL" updateIntervalInSeconds: 10 printIntervalInSeconds: 5 printStatus: true updateStatusBar: true;
Logger
The logger used in this package is available separately in log-with-statusbar npm package