Checks your crypto watchlist every hour and sends a Telegram alert for each coin that moved more than your threshold.
Uses
CoinMarketCap
Telegram
Alert me in Telegram when a coin moves sharply
watchlist to blank.Set watchlist to blank.alertChatId to blank.Set alertChatId to blank.movePercent to blank.Set movePercent to blank.maxAlertsPerRun to 10.Set maxAlertsPerRun to 10.coinsSearched to 300.Set coinsSearched to 300.alertThreshold to 0.Set alertThreshold to 0.thresholdErrorIf a step below fails, save the error as thresholdErrorTry
movePercent multiplied by 1 to 2 decimal places and save it as alertThreshold.Round movePercent multiplied by 1 to 2 decimal places and save it as alertThreshold.On error
The move percentage is not a number..Show in the output: The move percentage is not a number..alertThreshold is less than or equal to 0If alertThreshold is less than or equal to 0Yes
No
No steps
alertCap to 0.Set alertCap to 0.capErrorIf a step below fails, save the error as capErrorTry
maxAlertsPerRun multiplied by 1 to the nearest integer and save it as alertCap.Round maxAlertsPerRun multiplied by 1 to the nearest integer and save it as alertCap.On error
The alert cap is not a number..Show in the output: The alert cap is not a number..alertCap is less than or equal to 0If alertCap is less than or equal to 0Yes
No
No steps
watchedSymbols to an empty list.Set watchedSymbols to an empty list.watchlistEntry in watchlist split by ,:For each watchlistEntry in watchlist split by ,:watchlistEntry uppercase and save it as cleanedSymbol.Make watchlistEntry uppercase and save it as cleanedSymbol.cleanedSymbol isn't emptyIf cleanedSymbol isn't emptyYes
cleanedSymbol to the end of watchedSymbols and save it as watchedSymbols.Add cleanedSymbol to the end of watchedSymbols and save it as watchedSymbols.No
No steps
watchedSymbols is emptyIf watchedSymbols is emptyYes
No
No steps
listings.Get top CoinMarketCap cryptocurrencies. Save it as listings.rows to listings.listings.data.Set rows to listings.listings.data.alertsSent to 0.Set alertsSent to 0.row in rows:For each row in rows:alertsSent is greater than or equal to alertCapIf alertsSent is greater than or equal to alertCapYes
No
No steps
symbol to row.symbol.Set symbol to row.symbol.shouldAlert to false.Set shouldAlert to false.alertText to blank.Set alertText to blank.rowErrorIf a step below fails, save the error as rowErrorTry
symbol isn't empty and watchedSymbols contains symbolIf symbol isn't empty and watchedSymbols contains symbolYes
usdQuote to row.quote.USD.Set usdQuote to row.quote.USD.hourChangeRaw to usdQuote.percent_change_1h.Set hourChangeRaw to usdQuote.percent_change_1h.hourChange to 0.Set hourChange to 0.moveSize to -1.Set moveSize to -1.hourChangeRaw isn't emptyIf hourChangeRaw isn't emptyYes
hourChange to hourChangeRaw multiplied by 1.Change hourChange to hourChangeRaw multiplied by 1.hourChange and save it as moveSize.Calculate the absolute value of hourChange and save it as moveSize.No
No steps
moveSize is greater than or equal to alertThresholdIf moveSize is greater than or equal to alertThresholdYes
alertLines to an empty list.Set alertLines to an empty list.heading to symbol.Set heading to symbol.row.name isn't emptyIf row.name isn't emptyYes
heading to row.name (symbol).Change heading to row.name (symbol).No
No steps
heading to the end of alertLines and save it as alertLines.Add heading to the end of alertLines and save it as alertLines.hourChange formatted as a plain number with 2 decimal places% to the end of alertLines and save it as alertLines.Add 1h change: hourChange formatted as a plain number with 2 decimal places% to the end of alertLines and save it as alertLines.alertThreshold formatted as a plain number with 2 decimal places% in an hour to the end of alertLines and save it as alertLines.Add Your alert threshold: alertThreshold formatted as a plain number with 2 decimal places% in an hour to the end of alertLines and save it as alertLines.priceLine to Price: not reported by CoinMarketCap.Set priceLine to Price: not reported by CoinMarketCap.priceRaw to usdQuote.price.Set priceRaw to usdQuote.price.priceRaw isn't emptyIf priceRaw isn't emptyYes
priceErrorIf a step below fails, save the error as priceErrorTry
priceNumber to priceRaw multiplied by 1.Set priceNumber to priceRaw multiplied by 1.priceNumber is less than 1If priceNumber is less than 1Yes
priceLine to Price: priceNumber formatted as US dollars with 8 decimal places.Change priceLine to Price: priceNumber formatted as US dollars with 8 decimal places.No
priceLine to Price: priceNumber formatted as US dollars with 2 decimal places.Change priceLine to Price: priceNumber formatted as US dollars with 2 decimal places.On error
The price came back in a form that is not a number, so it was left out..Show in the output: The price came back in a form that is not a number, so it was left out..No
No steps
priceLine to the end of alertLines and save it as alertLines.Add priceLine to the end of alertLines and save it as alertLines.dayChangeRaw to usdQuote.percent_change_24h.Set dayChangeRaw to usdQuote.percent_change_24h.dayChangeRaw isn't emptyIf dayChangeRaw isn't emptyYes
dayChangeRawErrorIf a step below fails, save the error as dayChangeRawErrorTry
dayChangeRaw multiplied by 1 formatted as a plain number with 2 decimal places% to the end of alertLines and save it as alertLines.Add 24h change: dayChangeRaw multiplied by 1 formatted as a plain number with 2 decimal places% to the end of alertLines and save it as alertLines.On error
A percentage came back in a form that is not a number, so it was left out..Show in the output: A percentage came back in a form that is not a number, so it was left out..No
No steps
Observed market data from CoinMarketCap. Not financial advice. to the end of alertLines and save it as alertLines.Add Observed market data from CoinMarketCap. Not financial advice. to the end of alertLines and save it as alertLines.alertLines with a new line and save it as alertText.Join alertLines with a new line and save it as alertText.shouldAlert to true.Change shouldAlert to true.No
No steps
No
No steps
On error
rowError as text.Show in the output: Skipped one coin while checking for moves: rowError as text.shouldAlert is yesIf shouldAlert is yesYes
alertChatId.Send a message to chat alertChatId.alertTextalertsSent.Add 1 to alertsSent.No
No steps