Guides
Give an AI Agent the FOMO Firehose
Autonomous trading agents need a trustworthy data feed. This shows how to feed the FOMO realtime WebSocket (?trader=<handle>) and /v2/users/{handle}/positions to an agent that mirrors the best FOMO traders, with PnL as its context.

Autonomous trading agents are the format of the moment: an LLM wired to a live data feed and an execution layer, left to act on its own. The hard part is rarely the model. It is giving the agent a clean, trustworthy stream of what real traders are doing. The FOMO API is built for exactly that feed.
The feed: one trader, in realtime
Point the agent at the traders worth mirroring and subscribe to each one individually. The WebSocket takes a ?trader= filter, so the agent only wakes on that person's activity:
const ws = new WebSocket("wss://api.fomoapi.io/ws/alerts?trader=<handle>&key=YOUR_API_KEY");
ws.onmessage = (m) => {
const a = JSON.parse(m.data);
if (a.type === "alert") handleTrade(a); // { type:"buy"|"sell", trader, token, tokenAddress, usdValue, chain, chainId }
};
Each alert carries the token contract (tokenAddress), the friendly chain name, and the usdValue of the trade, which is enough for the agent to size and route an order. The stream is realtime on any paid plan; a free key is realtime for 7 days from creation, then 15-second delayed.
The context the model reads before acting
An agent should not copy blindly. Before mirroring a trade, have it pull the trader's recent history and judge it:
curl "https://api.fomoapi.io/v2/users/<handle>/positions?limit=50" \
-H "authorization: Bearer YOUR_API_KEY"
Each trade has side, sizeUsd, realizedPnlUsd, chain, and timestamps. Because every handle carries its wallets, the agent can check a claim against the chain rather than a screenshot. Add the written thesis for the token with /v2/thesis/token/<mint> so the model has the trader's own reasoning as context.
Pick who to follow, programmatically
Rather than hardcode handles, let the agent choose from the verified leaderboard:
curl "https://api.fomoapi.io/v2/leaderboard/7d?limit=25" \
-H "authorization: Bearer YOUR_API_KEY"
Rank by pnlUsd, filter by trade count and account age (from /v2/users/<handle>), then open a ?trader= socket for each survivor. To find the wallets behind the biggest recent winners specifically, see Find the wallets that found the last 100x.
A note on risk
Copy-trading is not free money. You are always behind the trader you mirror: they had a better entry, and by the time an alert reaches you the price has moved. Sizing, slippage, and the fact that a strong 7-day PnL can reverse are all on you. Treat the feed as a high-quality signal to reason over, not a guarantee. For a fuller pattern, our guide to a real-time copy-trading data feed walks the same flow end to end.
Get a free key at the dashboard and read the docs for the full endpoint list.
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