Software that tells you when the price of a crypto has gone down.
MIT License
Contains software for notifying the user, when the price of monitored cryptocurrency, drops past a set threshold.
To add a Custom Notification Provider:
scripts/nodejs-crypto-dip-alert/notifications
folder ending with .notification.js
notify
function from module.exports
coin
maxPrice
currentPrice
dipThreshold
.env
file to determine if custom notif will be used.NOTIFY_YORUBA=
NOTIFY_MAILGUN=
/**
* posts a notification in the terminal console
* @param {{symbol: string, priceUsd: number}} coin
* @param {number} maxPrice
* @param {number} currentPrice
* @param {number} dipThreshold
*/
const notify = async (coin, maxPrice, currentPrice, dipThreshold) => {
// early return if not set in env flags
if (!process.env.NOTIFY_YORUBA || process.env.NOTIFY_YORUBA !== 'true') return;
console.log(`[🚨🚨🚨💰🚨🚨🚨] Egbami, ye, 😢 ${coin.symbol} ti jona`);
console.log(`[👀] Iwọn ti o pọju: ${maxPrice} `);
console.log(`[👀] Ni in si: ${currentPrice} `);
console.log(`[👀] Àbáwọlé: ${dipThreshold} `);
// await here if you need to
return Promise.resolve();
}
module.exports = notify;