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

# Whale & KOL Trade Tracking

> Build whale watches, KOL trackers, trading alerts, and copy-trading signals with the Solana Tracker Whale & KOL REST API and Datastream rooms.

Track high-value Solana trades and KOL activity without maintaining your own wallet-labeling or trade-indexing pipeline.

<Info>
  The REST API returns the latest indexed trades. Datastream delivers new trades in real time over WebSocket. Both use your Solana Tracker Data API key.
</Info>

## What you can build

* **Whale watch:** alert when a trade exceeds a $1k, $2.5k, $5k, or $10k threshold.
* **Whale tracker:** build a live feed of high-volume wallets, tokens, protocols, and buy/sell direction.
* **KOL tracker:** monitor the shared KOL roster and display identity metadata when available.
* **KOL token page:** show KOL activity for one token with `hideArb=true`.
* **Copy-trading trigger:** use a KOL or whale trade as a signal, then apply your own risk and execution rules.

KOL tier rooms and REST filters use cumulative minimum thresholds.

## REST API

### Latest whale trades

Fetch the newest high-volume trades:

```bash theme={null}
curl "https://data.solanatracker.io/trades/whales?minVolume=10000&limit=50&hideArb=true" \
  -H "x-api-key: YOUR_API_KEY"
```

`minVolume` accepts `1000`, `2500`, `5000`, or `10000`. Results are sorted newest first.

### Latest KOL trades

Fetch trades from wallets on the shared KOL roster:

```bash theme={null}
curl "https://data.solanatracker.io/trades/kols?minVolume=2500&limit=100" \
  -H "x-api-key: YOUR_API_KEY"
```

For all eligible KOL trades, use `minVolume=0` or omit `minVolume` entirely:

```bash theme={null}
curl "https://data.solanatracker.io/trades/kols?limit=100" \
  -H "x-api-key: YOUR_API_KEY"
```

When identity data is available, each trade includes:

```json theme={null}
{
  "wallet": "9jyqFiLnruggWnN4EQwBNFXwpbLM9hrA4hV59ytyAVVz",
  "type": "buy",
  "volume": 1517.82,
  "identity": {
    "name": "Example KOL",
    "twitter": "@example"
  }
}
```

### KOL trades for one token

Use a mint-scoped feed for a token detail page or token-specific alert:

```bash theme={null}
curl "https://data.solanatracker.io/trades/kols/TOKEN_MINT?minVolume=1000&hideArb=true" \
  -H "x-api-key: YOUR_API_KEY"
```

The token-scoped KOL endpoint also defaults to `minVolume=0`; pass `minVolume=0` explicitly when you want to make that behavior clear.

With `hideArb=true`, the response keeps only rows where the requested mint is one side of the trade.

### Paginate through history

Responses include `nextCursor` and `hasNextPage`. Pass the opaque cursor back unchanged:

```javascript theme={null}
const base = "https://data.solanatracker.io/trades/whales";
const params = new URLSearchParams({
  minVolume: "5000",
  limit: "250",
  showMeta: "true",
});

let cursor;
do {
  if (cursor) params.set("cursor", cursor);

  const response = await fetch(`${base}?${params}`, {
    headers: { "x-api-key": process.env.SOLANA_TRACKER_API_KEY },
  });
  const page = await response.json();

  for (const trade of page.trades) {
    console.log(trade.time, trade.type, trade.volume, trade.wallet);
  }

  cursor = page.hasNextPage ? page.nextCursor : null;
} while (cursor);
```

Use `showMeta=true` when your UI needs token names, symbols, images, decimals, or historical prices for the `from` and `to` sides.

<Warning>
  Treat `nextCursor` as opaque. Do not decode, modify, or construct cursors in application code.
</Warning>

## Real-time Datastream

Connect to:

```text theme={null}
wss://datastream.solanatracker.io/{YOUR_API_KEY}
```

### Whale watch

Join a tier room to receive new qualifying trades:

```javascript theme={null}
const ws = new WebSocket(
  "wss://datastream.solanatracker.io/YOUR_API_KEY"
);

ws.addEventListener("open", () => {
  ws.send(JSON.stringify({
    type: "join",
    room: "transaction:whale:10000",
  }));
});

ws.addEventListener("message", (event) => {
  const message = JSON.parse(event.data);
  if (message.type !== "message") return;

  for (const trade of message.data) {
    const label = trade.type === "buy" ? "WHALE BUY" : "WHALE SELL";
    console.log(
      `${label} $${trade.volume.toLocaleString()} ` +
      `${trade.token?.to?.symbol ?? "token"} by ${trade.wallet}`
    );
  }
});
```

Available whale rooms:

```text theme={null}
transaction:whale:1000
transaction:whale:2500
transaction:whale:5000
transaction:whale:10000
```

Rooms are cumulative. A \$12,000 trade is delivered to the `1000`, `2500`, `5000`, and `10000` rooms. Join only the tiers your application needs.

### KOL tracker

`transaction:kol` receives every eligible KOL trade, including trades below the \$1,000 tier threshold:

```javascript theme={null}
ws.send(JSON.stringify({
  type: "join",
  room: "transaction:kol",
}));

ws.addEventListener("message", (event) => {
  const message = JSON.parse(event.data);
  if (message.type !== "message" || message.room !== "transaction:kol") {
    return;
  }

  const trade = message.data[0];
  const identity = trade.identity?.twitter || trade.identity?.name || trade.wallet;
  console.log(
    `${identity}: ${trade.type} $${trade.volume.toLocaleString()} ` +
    `on ${trade.token?.to?.symbol ?? trade.token?.from?.symbol ?? "token"}`
  );
});
```

For high-value KOL alerts, use cumulative tier rooms:

```javascript theme={null}
ws.send(JSON.stringify({
  type: "join",
  room: "transaction:kol:5000",
}));
```

### KOL signal pipeline

Use a small event pipeline to turn KOL trades into alerts or review queues:

```javascript theme={null}
function handleKolTrade(message) {
  if (message.type !== "message") return;

  for (const trade of message.data) {
    const identity = trade.identity;
    const token = trade.token?.to?.symbol || trade.token?.from?.symbol;

    if (trade.type === "buy" && trade.volume >= 5000) {
      console.log({
        event: "kol_buy_signal",
        wallet: trade.wallet,
        name: identity?.name,
        twitter: identity?.twitter,
        token,
        volumeUsd: trade.volume,
        signature: trade.tx,
      });
    }
  }
}

ws.addEventListener("message", (event) => {
  handleKolTrade(JSON.parse(event.data));
});
```

Use signals for research, notifications, or a human review queue. Do not mirror trades blindly: check liquidity, slippage, token safety, wallet exposure, and whether the trade is part of an arbitrage route before executing anything.

## Message shape

Whale and KOL Datastream messages contain one enriched trade in a one-item `data` array:

```json theme={null}
{
  "type": "message",
  "room": "transaction:whale:10000",
  "data": [
    {
      "tx": "TRANSACTION_SIGNATURE",
      "amount": 125000.5,
      "priceUsd": 0.00012,
      "solVolume": 12.5,
      "volume": 12500,
      "type": "buy",
      "wallet": "WALLET_ADDRESS",
      "time": 1786470000000,
      "program": "raydium",
      "token": {
        "from": { "symbol": "SOL", "amount": 12.5 },
        "to": { "symbol": "MEME", "amount": 125000.5 }
      },
      "identity": {
        "name": "Example KOL",
        "twitter": "@example"
      }
    }
  ]
}
```

`identity` is present when the trading wallet is on the shared KOL roster. `time` is a Unix timestamp in milliseconds. `volume` is absolute USD volume; use `type` to determine buy or sell direction.

## Production checklist

1. Deduplicate by transaction signature plus wallet, token, and side if your consumer reconnects.
2. Persist the last REST `nextCursor` when backfilling.
3. Reconnect WebSocket clients with exponential backoff.
4. Join only the required rooms to avoid duplicate cumulative events.
5. Store the raw trade and your derived alert separately.
6. Apply your own risk and execution checks before copy trading.

<CardGroup cols={2}>
  <Card title="Whale & KOL REST API" href="/data-api/whale-kol" icon="whale" iconType="duotone">
    Browse endpoint parameters, response schemas, and pagination.
  </Card>

  <Card title="Whale & KOL Datastream" href="/datastream/whale-kol" icon="radio" iconType="duotone">
    Browse rooms, join messages, and live trade payloads.
  </Card>

  <Card title="Live Transactions" href="/guides/live-transactions" icon="repeat" iconType="duotone">
    Subscribe to every swap for a token.
  </Card>

  <Card title="KOL Tracking" href="/guides/kol-tracking" icon="star" iconType="duotone">
    Analyze wallet performance and KOL activity.
  </Card>
</CardGroup>
