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
const stock_crypto_monitor = require("stock-crypto-monitor")({
cryptosOfInterest: "BTC,ETH,LTC",
stocksOfInterest: ["AAPL", "GOOGL"]
});
stock_crypto_monitor.start();
const crypto_price_checker = require("../index.js")({
cryptosOfInterest: ["BTC", "ETH", "LTC"],
stocksOfInterest: ["AAPL", "GOOGL"],
updateIntervalInSeconds: 10
});
async function start() {
await crypto_price_checker.start();
// Prices are now available
let c = crypto_price_checker.getPrice("AAPL");
crypto_price_checker.log("AAPL: ", c);
}
start();
var stock_crypto_monitor = require("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
});
The logger used in this package is available separately in log-with-statusbar npm package