n8n Guides
n8nsolanacryptofree

Solana token percentage price drop alert on Telegram

Who this is for: anyone who thinks in percentages, not price levels — "tell me if it drops 15% from its recent high" is a moving target a fixed threshold can't express, especially on a token whose price you don't check daily.

What the workflow does

The base price alert workflow compares the current price against a fixed number you set once. This variant keeps a running high-water mark for the token in workflow state and alerts when the current price falls a percentage below that peak — the reference point moves up with the token instead of staying fixed.

Procedure

  1. Download the base solana-price-alert.json file and import it.
  2. Replace SOGLIA_PREZZO/DIREZIONE with a DROP_PERCENT env var (e.g. 15 for 15%).
  3. In the "Valuta cambio soglia" Code node: read the last known high from $getWorkflowStaticData('global').high (default to the current price on first run), update it to Math.max(high, currentPrice), then compute drop = (high - currentPrice) / high * 100 and set the alert flag when drop >= DROP_PERCENT and it wasn't already flagged for this high-water mark.
  4. Point the Telegram node at your bot (@BotFather) and include both the current price and the percentage drop in the message.
  5. Activate the workflow.

How it works under the hood

Tracking a high-water mark in $getWorkflowStaticData (instead of a fixed number) is what turns a static threshold into a trailing one — the same mechanism trading tools call a "trailing stop," done here with a public price API and no paid data feed.

Related: for a simple fixed price level instead of a moving percentage, see the plain price alert guide.