> ## Documentation Index
> Fetch the complete documentation index at: https://docs.circuit.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Watched Wallets

> FOMO traders, other wallets' Solana activity and memecoin candles.

`agent.fomo.leaderboards.retrieve({ window, top? })` returns FOMO's current ranking for `"24h"`, `"7d"`, `"30d"` or `"all"`, up to 150 traders with `rank`, `pnlUsd`, `volumeUsd`, `trades` and `wallets.evm` / `wallets.solana`; read it again to refresh. `agent.fomo.traders.retrieve({ username })` resolves one trader. A wallet is absent while FOMO is still resolving it.

`agent.solana.holdings.retrieve({ wallet })` reads any Solana wallet's `sol` and per-mint `tokens` now. `agent.solana.transactions.list({ wallet, lookbackMs?, limit? })` returns its successful transactions of the last hour at most (15 minutes by default), newest first, each with `signature`, block time `at` and the net `received` and `sent` per asset: both sides moving is a swap, one side alone a transfer. Use the signature to count a trade once. `agent.solana.candles.list({ mint, limit? })` returns completed one-minute USD candles (`openedAt`, `open`, `high`, `low`, `close`, `volumeUsd`) of the token's most liquid pool, oldest first, including fresh pump.fun tokens; a minute without trades has no candle, a token without a priced pool returns none, and native SOL (`11111111111111111111111111111111` in `received` and `sent`) has no mint, so ask for wrapped SOL `So11111111111111111111111111111111111111112`. Candles and holdings are signals, never swap prices. Each account may call `solana.transactions.list` 20 times a minute and every other read here 60 times a minute; candles also share one platform-wide budget, so a read beyond either fails with `TOO_MANY_REQUESTS`.

A continuous agent whose `circuit.toml` declares a `balanceChange` trigger without a `wallet` or `cooldownMs` watches the up to 100 wallets it passes to `agent.watchedWallets.set({ wallets })`, which replaces the list; each of their transactions arrives from `agent.next()` within seconds as a `balanceChange` trigger. Such a trigger leaves `agent.allocation` as it was unless the agent wrote since its last refresh. Keep entry snapshots and rolling windows in [memory](./memory).

```ts theme={null}
import type { RunFunction } from "circuit:sdk";

export const run: RunFunction = async (agent) => {
  const { traders } = await agent.fomo.leaderboards.retrieve({ window: "24h", top: 100 });
  await agent.watchedWallets.set({ wallets: traders.flatMap((t) => t.wallets.solana ?? []) });
  for (;;) {
    const trigger = await agent.next({ until: Date.now() + 60_000 });
    if (trigger?.kind !== "balanceChange" || trigger.sent.length === 0) continue;
    for (const { asset } of trigger.received.filter((moved) => !/^1{32}$/.test(moved.asset))) {
      const candles = await agent.solana.candles.list({ mint: asset, limit: 6 });
      const last = candles.at(-1);
      const high = candles.slice(0, -1).reduce((max, c) => Math.max(max, Number(c.high)), 0);
      if (last && Number(last.close) > high) await agent.log(`${asset} broke out after a FOMO buy`);
    }
  }
};
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.