Build a Solana Deployer Alert Telegram Bot with MadeOnSol Webhooks

Step-by-step guide to building a Telegram bot that fires instant deployer alerts using MadeOnSol webhooks. Covers server setup, HMAC signature verification, elite-tier filtering, and production deployment.

MadeOnSol··Updated · 13 min read
Build a Solana Deployer Alert Telegram Bot with MadeOnSol Webhooks

Disclosure: This article contains affiliate links. If you sign up through them, MadeOnSol may earn a commission at no extra cost to you. This never affects our rankings, ratings, or reviews.

Getting a Telegram message the moment a known pump.fun deployer launches a new token is more useful than a dashboard you have to remember to check. Polling an API on a schedule introduces latency and burns API quota. A webhook-driven Telegram bot solves both problems: MadeOnSol pushes the event to your server, your server formats and forwards it, and you get the alert on your phone without polling.

This guide builds a complete, production-ready Telegram alert bot that fires on deployer:alert and deployer:bond events. By the end you will have a running Node.js server that verifies signatures, filters for elite deployers, and sends formatted Telegram messages. If your team lives in Discord instead, the same webhook flow drives our Pump.fun deployer alert Discord bot guide — and if you want the polling-based version that runs on a free key with zero server setup, the deployer-alert Discord starter tutorial is the five-minute path. New to Telegram bots entirely? Start with the from-scratch grammY tutorial.

Prerequisites

  • Node.js 18+
  • A MadeOnSol PRO, ULTRA or BUSINESS API key — generic webhooks are not available on BASIC. Current limits are PRO 3, ULTRA 10 and BUSINESS 30 registered webhooks; Enterprise inherits at least the Business floor.
  • A Telegram account to create the bot
  • A publicly reachable HTTPS server — Telegram cannot push to localhost. For local development, use ngrok to create a tunnel. For production, any VPS with a domain works.

Architecture

The data flow is straightforward:

MadeOnSol API → POST /webhook → Express server → Verify HMAC → Filter deployer tier → Telegram Bot API

MadeOnSol signs every webhook payload with HMAC-SHA256 over <timestamp>.<body>. Your server verifies the signature and rejects anything outside a 5-minute freshness window before acting on the payload. This prevents both spoofed requests and replays of an intercepted payload.

Step 1: Create a Telegram Bot

Open Telegram and start a conversation with @BotFather. Run these commands:

/newbot

BotFather will ask for a name and username. After that, it gives you a bot token — a string like 7123456789:AAHdqTcvCH1vGWJxfSeofSs0K_h3-4EVzMA. Save this.

Next, get your chat ID. Start a conversation with your new bot by sending it any message. Then open this URL in a browser (replace YOUR_TOKEN):

https://api.telegram.org/botYOUR_TOKEN/getUpdates

Look for "chat":{"id":...} in the JSON response. That number is your chat ID. For group chats, the ID will be negative (e.g., -1001234567890).

Store both in your environment:

TELEGRAM_BOT_TOKEN=7123456789:AAHdqTcvCH1vGWJxfSeofSs0K_h3-4EVzMA
TELEGRAM_CHAT_ID=123456789
MADEONSOL_API_KEY=msk_your_key_here
# WEBHOOK_SECRET is added in Step 3: MadeOnSol generates it when you register the webhook

Step 2: Set Up the Express Server

Initialize the project:

mkdir deployer-alert-bot && cd deployer-alert-bot
npm init -y
npm install express dotenv
npm install -D @types/express @types/node typescript ts-node

Create src/server.ts:

import express, { Request, Response } from 'express';
import crypto from 'crypto';
import dotenv from 'dotenv';

dotenv.config();

const app = express();

// IMPORTANT: Use raw body for HMAC verification — parsed JSON won't match the signature
app.use('/webhook', express.raw({ type: 'application/json' }));
app.use(express.json());

const PORT = process.env.PORT || 4000;

app.post('/webhook', async (req: Request, res: Response) => {
  // Verify timestamp + signature first, reject anything stale or unsigned
  const ok = verifyMadeOnSol(
    req.body,
    req.get('X-MadeOnSol-Timestamp'),
    req.get('X-MadeOnSol-Signature'),
    process.env.WEBHOOK_SECRET!,
  );
  if (!ok) {
    console.warn('Invalid signature or stale timestamp, rejecting request');
    return res.status(401).send('Unauthorized');
  }

  // Acknowledge first: each delivery attempt times out after 10 seconds
  res.status(200).send('OK');

  const payload = JSON.parse(req.body.toString('utf8'));
  handleWebhookEvent(payload).catch(console.error);
});

app.listen(PORT, () => {
  console.log(`Webhook server listening on port ${PORT}`);
});

Step 3: Register the Webhook with MadeOnSol

Before events will arrive, you need to tell MadeOnSol where to send them. Make a POST request to https://madeonsol.com/api/v1/webhooks:

// scripts/register-webhook.ts
import dotenv from 'dotenv';
dotenv.config();

async function registerWebhook() {
  const response = await fetch('https://madeonsol.com/api/v1/webhooks', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer ${process.env.MADEONSOL_API_KEY}`,
    },
    body: JSON.stringify({
      url: 'https://your-server.example.com/webhook',
      events: ['deployer:alert', 'deployer:bond'],
    }),
  });

  const data = await response.json();
  if (!response.ok) throw new Error(JSON.stringify(data));
  // The secret is generated by MadeOnSol and shown ONCE. Save it now.
  console.log('Webhook id:', data.webhook.id);
  console.log('WEBHOOK_SECRET=' + data.webhook.secret);
}

registerWebhook().catch(console.error);

Run this once: npx ts-node scripts/register-webhook.ts

MadeOnSol generates the signing secret and returns it only in this response, as webhook.secret. Copy it into your .env as WEBHOOK_SECRET right away; it cannot be read back later. You do not choose the secret: the create call ignores any secret field you send, so a secret you invented would never match the signatures. The webhook is active as soon as it is created. Save the webhook id too; you need it to test, update or delete the webhook later.

Step 4: Verify the HMAC Signature

Every incoming request includes X-MadeOnSol-Timestamp (unix milliseconds, new for every delivery attempt) and X-MadeOnSol-Signature (the bare lowercase hex HMAC-SHA256 of <timestamp>.<body>, keyed with your webhook secret exactly as MadeOnSol returned it). Reject anything older than 5 minutes: the timestamp plus a freshness check is what prevents an attacker who captured a single legitimate webhook from replaying it later. The window is your own check; MadeOnSol does not enforce one, and because every retry is signed again it never rejects a legitimate retry.

// rawBody:   the exact request bytes (never re-serialized JSON)
// secret:    the webhook secret exactly as the API returned it (do not hex-decode)
function verifyMadeOnSol(rawBody: Buffer | string, timestamp: string | undefined, signature: string | undefined, secret: string): boolean {
  // X-MadeOnSol-Timestamp: unix milliseconds, fresh on every retry
  if (typeof timestamp !== "string" || !/^\d{1,16}$/.test(timestamp)) return false;
  // Replay window: your choice, the server does not enforce one
  if (Math.abs(Date.now() - Number(timestamp)) > 5 * 60_000) return false;
  // X-MadeOnSol-Signature: 64 hex characters, bare (no algorithm prefix)
  if (typeof signature !== "string" || !/^[0-9a-f]{64}$/i.test(signature)) return false;
  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${timestamp}.`)
    .update(rawBody)
    .digest();
  // Both sides are exactly 32 bytes here, so this compares in constant time and cannot throw
  return crypto.timingSafeEqual(expected, Buffer.from(signature, "hex"));
}

Three important details:

  • Use express.raw() on the webhook route, not express.json(). Once the body is parsed to an object, the byte-for-byte match against the signature will fail.
  • Concatenate ${timestamp}. (a string) with the raw body buffer — do not JSON-encode anything. The receiver must reproduce the exact byte sequence the sender signed.
  • Use crypto.timingSafeEqual instead of === to prevent timing-based attacks. Validating the header as 64 hex characters first means both buffers are exactly 32 bytes, so the comparison cannot throw on a malformed header.

For a deeper, multi-language treatment of this exact signature scheme — including a Python/FastAPI implementation and the common mistakes that break it — see verifying HMAC-signed webhooks in Node.js and Python.

Step 5: Format and Send the Telegram Message

Add the Telegram send function:

async function sendTelegram(text: string): Promise<void> {
  const url = `https://api.telegram.org/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMessage`;

  await fetch(url, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      chat_id: process.env.TELEGRAM_CHAT_ID,
      text,
      parse_mode: 'HTML',
      disable_web_page_preview: true,
    }),
  });
}

Now write the event handler that formats deployer events:

// The fields this bot reads. deployer:alert and deployer:bond carry more
// (bonding_rate, recent_bond_rate, runner_rate, deployer_sol_balance, ...).
interface DeployerAlertPayload {
  event: 'deployer:alert' | 'deployer:bond';
  data: {
    deployer_wallet: string;
    deployer_tier: 'elite' | 'good' | 'rising';
    token_mint: string;
    token_name: string | null;
    token_symbol: string | null;
    total_bonded: number;
    total_deployed: number;
    bonding_rate: number;
    runner_rate: number | null;
    market_cap_at_alert: number | null;
  };
}

// Token names are free text: escape them for parse_mode HTML
const esc = (s: unknown) =>
  String(s ?? '').replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');

async function handleWebhookEvent(payload: DeployerAlertPayload): Promise<void> {
  const { event, data } = payload;

  if (event === 'deployer:alert' || event === 'deployer:bond') {
    await handleDeployerEvent(event, data);
  }
}

async function handleDeployerEvent(
  event: string,
  data: DeployerAlertPayload['data']
): Promise<void> {
  const tierEmoji: Record<string, string> = {
    elite: '[ELITE]',
    good: '[GOOD]',
    rising: '[RISING]',
  };

  const eventLabel = event === 'deployer:bond' ? 'Bonded' : 'New Launch';
  const tier = tierEmoji[data.deployer_tier] || data.deployer_tier.toUpperCase();
  const mcap = data.market_cap_at_alert
    ? `$${(data.market_cap_at_alert / 1000).toFixed(1)}k`
    : 'N/A';

  const message = [
    `<b>${tier} Deployer: ${eventLabel}</b>`,
    ``,
    `Token: <b>${esc(data.token_name)} (${esc(data.token_symbol)})</b>`,
    `CA: <code>${data.token_mint}</code>`,
    ``,
    `Bonded: <b>${data.total_bonded} of ${data.total_deployed}</b> launches`,
    `Market Cap: ${mcap}`,
    ``,
    `<a href="https://pump.fun/coin/${data.token_mint}">pump.fun</a> | <a href="https://dexscreener.com/solana/${data.token_mint}">DexScreener</a>`,
  ].join('\n');

  await sendTelegram(message);
  console.log(`Alert sent for ${data.token_symbol} (${data.deployer_tier} deployer)`);
}

Building a product on Solana or Robinhood Chain data?

Skip the Geyser pipeline — embed KOL flow, deployer reputation, and the all-DEX firehose over REST, WebSocket, or webhooks. The Business tier (€400/mo) is the self-serve embed license at 500k calls/day — Enterprise adds white-label & redistribution.

See Business pricing

Step 6: Filter for Elite Deployers Only

If you want to reduce noise and only alert on the highest-confidence deployers, filter by tier before sending:

const ALERT_TIERS: Set<string> = new Set(['elite', 'good']);

async function handleDeployerEvent(
  event: string,
  data: DeployerAlertPayload['data']
): Promise<void> {
  // Drop anything below your threshold
  if (!ALERT_TIERS.has(data.deployer_tier)) {
    console.log(`Skipping ${data.token_symbol}, tier: ${data.deployer_tier}`);
    return;
  }

  // ... rest of formatting and send
}

Deployer alerts are sent for three tiers, ranked highest to lowest: elite, good and rising. Elite deployers have the strongest historical track records. Starting with just elite will give you a low-volume, high-signal feed. You can also let MadeOnSol drop the other tiers before delivery by registering the webhook with "filters": { "deployer_tier": ["elite"] }.

You can also filter on the deployer's bonding record directly if you want finer control (bonding_rate is the share of their launches that bonded, 0 to 1):

if (data.bonding_rate < 0.6) return; // Require 60%+ of launches bonded

Step 7: Deploy to a Public Server

MadeOnSol needs a publicly reachable HTTPS URL to deliver webhooks. Your options:

For local development — ngrok:

npx ngrok http 4000

ngrok gives you a temporary https://xxxx.ngrok.io URL. Use that when registering the webhook. Note that the URL changes every time you restart ngrok (on the free tier), so you will need to re-register the webhook.

For production — any VPS with nginx:

Set up nginx as a reverse proxy in front of your Node server. Your webhook URL becomes https://yourdomain.com/webhook. Make sure your TLS certificate is valid — MadeOnSol will not deliver to endpoints with invalid certificates.

A minimal PM2 setup to keep the process alive:

npm install -g pm2
pm2 start dist/server.js --name deployer-bot
pm2 save
pm2 startup

Testing Your Webhook

Once deployed, trigger a test delivery from the MadeOnSol API to verify your server is receiving and processing payloads correctly:

curl -X POST https://madeonsol.com/api/v1/webhooks/test \
  -H "Authorization: Bearer msk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"webhook_id": 123}'

webhook_id is the numeric id from Step 3. This sends a signed sample delivery for the webhook's first subscribed event (here deployer:alert) to your registered URL, with "_test": true inside data. Check your server logs to confirm receipt and that the signature verified, and check Telegram to confirm the message arrived.

Troubleshooting: Auto-Disable Behavior

MadeOnSol will automatically disable a webhook after 10 consecutive failed deliveries and email you. A delivery fails when your endpoint answers with a non-2xx status code, times out after 10 seconds, or cannot be reached. A 5xx, a 429, a timeout or a connection error is retried after about 5 seconds, 30 seconds and 2 minutes, and counts as one failure only once those retries are used up. A 3xx or any other 4xx (for example a 401 from a signature check that uses the wrong secret) is not retried and counts as a failure straight away. Any successful delivery resets the counter.

If your bot goes offline for a long time or keeps rejecting deliveries, the webhook will be disabled and you will stop receiving events. To re-enable:

curl -X PATCH https://madeonsol.com/api/v1/webhooks/YOUR_WEBHOOK_ID \
  -H "Authorization: Bearer msk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"is_active": true}'

The field is is_active, and setting it to true also resets the failure counter. An enabled field is silently ignored, so it would leave the webhook disabled. Because of the retries, a server restart that takes less than a few seconds is unlikely to cause missed events.

To check current webhook status and see recent delivery history:

curl https://madeonsol.com/api/v1/webhooks/YOUR_WEBHOOK_ID \
  -H "Authorization: Bearer msk_your_key_here"

Complete Server Code

Here is the full src/server.ts with all pieces assembled:

import express, { Request, Response } from 'express';
import crypto from 'crypto';
import dotenv from 'dotenv';

dotenv.config();

const app = express();
app.use('/webhook', express.raw({ type: 'application/json' }));
app.use(express.json());

const ALERT_TIERS = new Set(['elite', 'good']);
const seen = new Set<string>(); // use Redis or a DB unique key in production

// rawBody:   the exact request bytes (never re-serialized JSON)
// secret:    the webhook secret exactly as the API returned it (do not hex-decode)
function verifyMadeOnSol(rawBody: Buffer | string, timestamp: string | undefined, signature: string | undefined, secret: string): boolean {
  // X-MadeOnSol-Timestamp: unix milliseconds, fresh on every retry
  if (typeof timestamp !== "string" || !/^\d{1,16}$/.test(timestamp)) return false;
  // Replay window: your choice, the server does not enforce one
  if (Math.abs(Date.now() - Number(timestamp)) > 5 * 60_000) return false;
  // X-MadeOnSol-Signature: 64 hex characters, bare (no algorithm prefix)
  if (typeof signature !== "string" || !/^[0-9a-f]{64}$/i.test(signature)) return false;
  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${timestamp}.`)
    .update(rawBody)
    .digest();
  // Both sides are exactly 32 bytes here, so this compares in constant time and cannot throw
  return crypto.timingSafeEqual(expected, Buffer.from(signature, "hex"));
}

const esc = (s: unknown) =>
  String(s ?? '').replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');

async function sendTelegram(text: string): Promise<void> {
  await fetch(`https://api.telegram.org/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMessage`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      chat_id: process.env.TELEGRAM_CHAT_ID,
      text,
      parse_mode: 'HTML',
      disable_web_page_preview: true,
    }),
  });
}

app.post('/webhook', async (req: Request, res: Response) => {
  const ok = verifyMadeOnSol(
    req.body,
    req.get('X-MadeOnSol-Timestamp'),
    req.get('X-MadeOnSol-Signature'),
    process.env.WEBHOOK_SECRET!,
  );
  if (!ok) return res.status(401).send('Unauthorized');

  res.status(200).send('OK'); // acknowledge inside the 10 s delivery timeout

  const { event, data } = JSON.parse(req.body.toString('utf8'));
  if (event !== 'deployer:alert' && event !== 'deployer:bond') return;
  if (!ALERT_TIERS.has(data.deployer_tier)) return;

  // No event id on the envelope: a retry resends the same body, so dedupe on
  // alert_id for launches and on the mint for bonds (a token bonds once).
  const key = event === 'deployer:alert' ? `alert:${data.alert_id ?? data.tx_signature}` : `bond:${data.token_mint}`;
  if (seen.has(key)) return;
  seen.add(key);

  const eventLabel = event === 'deployer:bond' ? 'Bonded' : 'New Launch';
  const mcap = data.market_cap_at_alert ? `$${(data.market_cap_at_alert / 1000).toFixed(1)}k` : 'N/A';
  const tierLabel = data.deployer_tier === 'elite' ? '[ELITE]' : '[GOOD]';

  const message = [
    `<b>${tierLabel} Deployer: ${eventLabel}</b>`,
    ``,
    `Token: <b>${esc(data.token_name)} (${esc(data.token_symbol)})</b>`,
    `CA: <code>${data.token_mint}</code>`,
    ``,
    `Bonded: <b>${data.total_bonded} of ${data.total_deployed}</b> launches`,
    `Market Cap: ${mcap}`,
    ``,
    `<a href="https://pump.fun/coin/${data.token_mint}">pump.fun</a> | <a href="https://dexscreener.com/solana/${data.token_mint}">DexScreener</a>`,
  ].join('\n');

  await sendTelegram(message).catch(console.error);
  console.log(`[${new Date().toISOString()}] Alert sent: ${data.token_symbol} (${data.deployer_tier})`);
});

app.listen(process.env.PORT || 4000, () => {
  console.log(`Webhook server listening on port ${process.env.PORT || 4000}`);
});

Next Steps

This bot handles deployer:alert and deployer:bond. The generic webhook registry currently accepts nine event types: kol:trade, kol:coordination, deployer:alert, deployer:bond, wallet_tracker:event, sniper:deploy, rhc:kol_trade, token:surge, and token:revival. Add only events whose payload shape your handler actually validates. The same architecture also powers a Solana whale alert bot for Discord and Telegram, which filters wallet-tracker events by SOL size instead of deployer tier. For the other events a Telegram bot backend can relay, and the plan each delivery transport needs, see Solana event feeds for Telegram bot builders.

If you want to go beyond alerts and add trade execution, combine this webhook server with the Jupiter swap API. The deployer alert gives you the token address; Jupiter handles the swap. That wiring is covered in How to Build a Solana Trading Bot.

See the MadeOnSol API docs for webhook payload schemas and the pricing page for tier limits.

September 2026 refresh

The webhook receiver/signature code remains aligned with the production delivery contract: HMAC-SHA256 over <timestamp>.<raw-body>, three retries (about 5s / 30s / 2min), and auto-disable after 10 consecutive failed deliveries. Plan wording now includes BUSINESS (30 generic webhooks), and the extension section lists the current 9-event registry rather than implying only the original KOL/deployer events exist.

Sources: API reference, pricing, and webhook guide.

Tools mentioned

Compare features and read reviews.

Live health scores, average ratings, and direct links on MadeOnSol.

Build a deployer sniper bot

Access deployer alerts, bonding stats, and tier data via API. Free tier: 200 requests/day.

Start free
import { MadeOnSol } from "madeonsol";

const client = new MadeOnSol({ apiKey: "msk_your_key" });

// Elite deployer alerts with KOL buy enrichment
const { alerts } = await client.deployer.alerts({ limit: 5 });

// Top deployers by bonding rate
const { deployers } = await client.deployer.leaderboard({ tier: "elite" });
npm install madeonsolFull API docs

Building a product on Solana or Robinhood Chain data?

MadeOnSol isn't an RPC or another generic token API — it's Solana & Robinhood Chain memecoin intelligence that's painful to build in-house, pulled from dual-region gRPC shred streams and our own Robinhood Chain node, pushed to your app as events land.

Signals you'd otherwise build

KOL & smart-money flow from 2,000+ labeled wallets, deployer reputation, coordination clusters, linked-wallet entity resolution, and an all-DEX firehose.

Embed it in your product

The Business tier (€400/mo, self-serve) licenses you to display MadeOnSol data inside your own product — 500k calls/day, 15 WS + 6 firehose connections. Enterprise above adds white-label & redistribution rights and custom endpoints.

Evaluate first, commit later

Test everything on a free ULTRA key — no commitment. If it fits, we scope volume or white-label pricing.

Keep reading

More from the blog.

All Developer Tools
Pump.fun Deployer Math (2026): 561K Wallets, 1.89% Bond Rate

Analytics

Pump.fun Deployer Math (2026): 561K Wallets, 1.89% Bond Rate

Inside the pump.fun deployer dataset — 561,645 wallets, 25,560 bonds, 11,643 repeat ruggers. The 39x gap between elite deployers and the noise.

11 minMay 28, 2026
Build a Real-Time Solana KOL Copy Trade Dashboard with Next.js and MadeOnSol

Developer Tools

Build a Real-Time Solana KOL Copy Trade Dashboard with Next.js and MadeOnSol

Build a live KOL trade feed and leaderboard dashboard in Next.js using the MadeOnSol API. Covers server components for leaderboard caching, client-side polling for the live feed, strategy tag filters, and deployer tier badges.

12 minApril 11, 2026
Build a Solana Trading Research Agent with LangChain and MadeOnSol Python SDK

Developer Tools

Build a Solana Trading Research Agent with LangChain and MadeOnSol Python SDK

Use the MadeOnSol Python SDK with LangChain and CrewAI to build AI agents that reason over real-time KOL trades, deployer alerts, and coordination signals — with x402 micropayment support.

7 minApril 11, 2026
BonkBot Review 2026: Is the Original Solana Telegram Bot Still Worth It?

Reviews

BonkBot Review 2026: Is the Original Solana Telegram Bot Still Worth It?

An honest review of BonkBot, the Telegram trading bot that helped kick off Solana's meme-coin trading wave. Covers features, the 1% fee and BONK buyback mechanism, security history, and how it stacks up in 2026.

8 minJuly 6, 2026
Mizar Review 2026: Multi-Chain Copy Trading and DCA Bots — Including Solana

Reviews

Mizar Review 2026: Multi-Chain Copy Trading and DCA Bots — Including Solana

Mizar bundles copy trading, DCA, and automated take-profit/stop-loss into one pay-per-trade platform across Solana, Ethereum, Base, and BNB Chain. Here's what it costs, what it does well, and why it's not a Solana-exclusive tool.

5 minJuly 6, 2026
FluxBot Review 2026: The RugCheck Team's Telegram Trading Bot

Reviews

FluxBot Review 2026: The RugCheck Team's Telegram Trading Bot

FluxBot is a Solana Foundation-backed Telegram bot built by the same team behind RugCheck, charging a flat 0.75% fee with native rug-scan integration. Here's what it does well, what's still on the roadmap, and how its FLUXB reward token actually works.

6 minJuly 6, 2026

Enjoyed this article?

Explore the live data.

Real-time KOL trades, Pump.fun deployer intel, and 1,200+ ranked Solana & Robinhood Chain tools — free to explore.

Open the KOL Tracker