Build a FOMO copy-trading watchlist with Fomo Api
A Python tutorial: pick top fomo.family traders from the leaderboard, poll their trades, and get alerted on new buys. Includes the call budget for each plan.
Published October 28, 2026 · 7 min read
The point of a leaderboard is knowing what the best traders are doing. This tutorial builds a small Python script that picks the top fomo.family traders, watches their trades, and prints each new buy. It's about 40 lines, and it's the core of every FOMO copy-trading alert bot.
What you need
- Python 3.9+ and
requests. - A Fomo Api key from the console, exported as
FOMO_API_KEY. Free works for trying it.
1. Pick traders from the leaderboard
Use the 7-day board so the list reflects recent form, and skip traders we haven't linked a wallet for yet: with no wallet, there are no on-chain trades to watch.
import os, time, requests
API = "https://api.fomo-api.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['FOMO_API_KEY']}"}
def top_traders(n=10):
r = requests.get(f"{API}/leaderboard", params={"window": "7d", "limit": 20},
headers=HEADERS, timeout=10)
r.raise_for_status()
rows = [row for row in r.json()["data"] if row["wallets"]]
return rows[:n]2. Poll each trader's trades
Ask for source=onchain so every trade has a txHash. That's both the proof the trade happened and the key you dedupe on.
def recent_trades(trader_id):
r = requests.get(f"{API}/traders/{trader_id}/trades",
params={"source": "onchain", "limit": 20},
headers=HEADERS, timeout=10)
if r.status_code == 429:
time.sleep(int(r.headers.get("Retry-After", "5")))
return []
r.raise_for_status()
return r.json()["data"]3. Alert on what's new
seen = set()
def run(poll_seconds=300):
traders = top_traders()
first = True
while True:
for t in traders:
for trade in recent_trades(t["traderId"]):
if trade["txHash"] in seen:
continue
seen.add(trade["txHash"])
if not first:
print(f"@{t['handle']} {trade['tokenIn']['address']} -> "
f"{trade['tokenOut']['address']} on {trade['venue']} "
f"https://solscan.io/tx/{trade['txHash']}")
first = False
time.sleep(poll_seconds)
run()The first pass only fills seen, so you don't get a burst of alerts for trades from last week. Swap the print for a Telegram or Discord webhook and you have an alert bot. Refresh traders once a day to follow who's leading now.
Budget your calls
Each poll costs one call per trader. The arithmetic for a 30-day month:
| TRADERS | POLL EVERY | CALLS / MONTH | PLAN THAT FITS |
|---|---|---|---|
| 3 | 1 hour | ~2,200 | Starter |
| 10 | 15 min | ~28,800 | Starter (75,000) |
| 10 | 5 min | ~86,400 | Pro (300,000) |
| 25 | 2 min | ~540,000 | Growth (1.5M) |
The free plan's 1,500 calls are enough to build and test this, not to run it around the clock. Watch X-Quota-Remaining on each response, and see pricing for current plans.
Before you trade on it
- Copying is always late. You see a trade after it lands on-chain and after your next poll. On thin tokens, that gap is the trade.
- A sell matters as much as a buy. The script prints both directions. Know which one you're looking at before acting.
- Leaderboard PnL is mark-to-market. A trader at the top this week may be riding one open position. Check
board=solanafor realized PnL; here's the difference.
Reference for every field used here: the trader trades guide and the docs overview.
Frequently asked questions
- Can I copy-trade FOMO traders with an API?
- You can watch them. Fomo Api gives you the fomo.family leaderboard and each trader's recent trades as JSON, so a script can alert you, or your own bot, when a trader buys. Placing the trade is up to your own wallet or bot; Fomo Api is read-only.
- How many API calls does a watchlist use?
- One call per trader per poll, plus one leaderboard call per refresh. Ten traders polled every 5 minutes is about 86,400 calls a month, which fits the Pro plan; polling every 15 minutes fits Starter.