Guides
Build a FOMO Copy-Trading Bot That Beats the Notifications
A notification-based copy-trading bot enters late, with the crowd, and copies position size instead of fill size. Build it on the on-chain trade stream instead: pick traders from the leaderboard, subscribe to their trades on-chain, size off the real fill, and exit when they exit.

Most FOMO copy-trading bots are built on the notification. A trader you follow buys, the app pushes an alert, the bot reads the alert and buys. It works, but it is slow in a way that costs money: the alert is what everyone else is reading too, and it arrives about 15 seconds after the trade actually happened.
This post is about building the bot one layer down, on the trade itself.
The problem with copying the notification
A push notification is a summary written after the fact. By the time it reaches a phone:
- The trade has been on-chain for roughly 15 seconds.
- Every other bot and every human following that trader has the same alert at the same moment.
- The size in the alert is the trader's position size, not the size of the fill you are trying to copy.
- Small entries, the ones that often come first on a new token, never got an alert at all.
So a notification bot enters late, enters with the crowd, and copies the wrong number. It is still better than refreshing the app by hand, but it leaves the edge on the table.
Copy the trade, not the alert
The on-chain stream gives you the same trade as a chain event: who bought, what they bought, how much, in which transaction, about 15 seconds before the app says anything. A bot on that stream acts before the alert exists.
The pipeline is short.
1. Pick who to copy. Pull the leaderboard and choose traders by realized PnL, not by follower count.
curl "https://api.fomoapi.io/v2/leaderboard/7d" -H "authorization: Bearer YOUR_API_KEY"
2. Subscribe to their trades on-chain. One socket, filtered to one trader, on the chain you trade.
const url = "wss://api.fomoapi.io/ws/trades";
const ws = new WebSocket(url + "?key=YOUR_API_KEY&trader=frankdegods&chain=robinhood");
ws.onmessage = (e) => {
const t = JSON.parse(e.data);
if (t.type !== "trade" || t.replay) return;
if (t.side === "buy" && t.usdValue >= 1000) mirror(t.token.address, t.usdValue);
};
You can also subscribe by wallet address instead of username, switch traders at runtime with a subscribe message, or drop the trader filter and run your own selection logic over the full stream.
3. Size off the real fill. usdValue is what actually crossed the pool in that transaction, so a percentage-of-their-size rule finally works. amountToken and txHash are there if you want to verify or hedge.
4. Exit the same way. Their sells come through the same socket, at the same speed, so your exit rule can be as simple as "sell when they sell."
Where the feed view still belongs
The feed view stream at wss://api.fomoapi.io/ws/alerts is not obsolete. It is exactly what people receive in the app, at the same time they receive it, and it carries things that do not exist on-chain: the trader's written thesis, price alerts, listings and milestones. A good bot uses both. The on-chain stream for the entry, the feed view to read the reasoning and to know what the crowd is about to see.
If you want to trade the second wave on purpose, for example fading the crowd after a big alert, the feed view is the right input for that too.
A few honest notes
- The stream covers Robinhood Chain and Solana today, which is where most FOMO volume is.
- A wallet only gets a username once we have mapped it; new traders show up as a wallet first. Filter by wallet if the name is missing.
- Fifteen seconds is a measured typical lead, not a promise. It depends on how quickly FOMO publishes a given trade.
- Being early on a memecoin is only an edge if your execution is fast too. Keep the bot on the same chain as the trade.
The on-chain stream is part of the Growth and Scale plans. Reference and message shape are in the docs. If you already run a notification bot, the earlier guide on building a thesis-driven copy-trading bot still applies; swap the trigger for the on-chain trade and keep the rest.
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