Home / Blog / Guides

Guides

Build a Robinhood Chain Whale Alert Bot

Stream FOMO buys on Robinhood Chain live and alert on the big ones. Connect to the WebSocket with ?chain=robinhood&type=buy, filter by usdValue, and forward to Telegram in about fifteen lines.

Pixel-art blockchain rail carrying linked blocks and early trading signals through a digital city.

Robinhood Chain is the busiest chain on fomo.family right now, which makes it the best place to watch for size. A whale alert bot answers one question: did someone just buy this chain in a size that matters. Here is one that does exactly that, and it is about fifteen lines.

The whole thing works because the FOMO API streams every buy, sell, and thesis live, and lets you scope the stream to one chain and one event type before it reaches you.

The stream, scoped to Robinhood buys

const ws = new WebSocket(
  "wss://api.fomoapi.io/ws/alerts?chain=robinhood&type=buy"
);

chain=robinhood is chain id 4663; type=buy drops sells and theses. Every message that arrives is already a Robinhood Chain buy, carrying the trader, the token, the contract, and the USD size:

{
  "alertType": "buy",
  "chain": "robinhood",
  "chainId": 4663,
  "trader": "dianwei0506",
  "token": "BONER",
  "tokenAddress": "0x98096d17e191b3da1d5f99a6d7b3584351b11e18",
  "usdValue": 5000,
  "ts": 1788191737835
}

The whole bot

import WebSocket from "ws";

const KEY = process.env.FOMO_API_KEY;
const MIN_USD = 2500;                       // only ping on buys this big or bigger
const TG = process.env.TELEGRAM_BOT_TOKEN;
const CHAT = process.env.TELEGRAM_CHAT_ID;

const ws = new WebSocket(
  "wss://api.fomoapi.io/ws/alerts?chain=robinhood&type=buy",
  { headers: { authorization: `Bearer ${KEY}` } }
);

ws.on("message", async (raw) => {
  const a = JSON.parse(raw);
  if (a.type !== "alert" || (a.usdValue || 0) < MIN_USD) return;
  const text = `Robinhood whale: ${a.trader} bought $${a.token} ` +
               `($${Math.round(a.usdValue).toLocaleString()})`;
  await fetch(`https://api.telegram.org/bot${TG}/sendMessage`, {
    method: "POST", headers: { "content-type": "application/json" },
    body: JSON.stringify({ chat_id: CHAT, text })
  });
});

Set MIN_USD to whatever counts as a whale for you. Change nothing else and it runs.

Tighten it further

The same connection takes more filters, so you can narrow before a single message reaches your bot:

  • &token=<symbol|address> to watch one Robinhood Chain token.
  • &trader=<handle> to watch one trader (drop type=buy to get their sells and theses too).
  • Widen to sells by removing type=buy and branching on a.alertType in the handler.

When a whale fires, resolve the buyer with GET /v2/users/<trader> to pull their Robinhood wallet and PnL, so your alert says who bought, not just what.

The free tier includes the WebSocket and 10,000 requests per month. For 24/7 streaming and higher volume, see /pricing.

FOMO API is an independent, unofficial data layer for fomo.family. It is not affiliated with, endorsed by, or sponsored by FOMO or Robinhood.

Ship on fomo.family trader data

Both-chain wallets, PnL and holdings, plus two live streams: the app feed on every plan, the on-chain stream on Growth. One API.

Get an API key

FAQ

How do I get only big Robinhood Chain buys?
Connect to wss://api.fomoapi.io/ws/alerts?chain=robinhood&type=buy, then in your handler ignore any message whose usdValue is below your threshold. chain=robinhood is chain id 4663.
What size counts as a whale?
You set it. The bot has a MIN_USD constant; each alert carries usdValue, so filter to whatever size matters for the tokens you follow.
Can I watch one token or one trader?
Yes. Add &token=<symbol or address> or &trader=<handle> to the same WebSocket URL. Filters combine, so ?chain=robinhood&type=buy&token=BONER is valid.
How do I know who the whale is?
Each alert carries the trader handle. Call GET /v2/users/<handle> to resolve their Robinhood Chain wallet and PnL.
Is this affiliated with Robinhood or FOMO?
No. FOMO API is an independent, unofficial data layer for fomo.family and is not affiliated with FOMO or Robinhood.