# Whale Tracking

Noelclaw monitors large on-chain movements, CEX inflow/outflow patterns, and smart money behavior — and delivers hourly alerts via Telegram.

***

## What Gets Tracked

| Signal Type            | Description                                                           |
| ---------------------- | --------------------------------------------------------------------- |
| Large wallet movements | Transfers above threshold (e.g. >$1M on-chain)                        |
| CEX inflows            | Large deposits to Binance, Coinbase, Bybit — potential sell pressure  |
| CEX outflows           | Large withdrawals from exchanges — potential accumulation             |
| Smart money patterns   | Known whale wallets, early mover wallets accumulating or distributing |

***

## How It Works

The whale alert engine runs hourly via Convex cron. It sends a structured prompt to the Bankr Agent API, which aggregates on-chain data, exchange flow data, and blockchain analytics.

**Flow:**

```
Convex cron (hourly)
    │
    ▼
whaleAlerts.ts — internalAction
    │
    ▼
Bankr Agent API
  → POST https://api.bankr.bot/agent/prompt
  → poll  https://api.bankr.bot/agent/job/{jobId}
    │
    ▼
Parse response → extract alert list
    │
    ▼
Save to whaleAlerts table
    │
    ▼
Send Telegram notification (if configured)
```

***

## Telegram Alert Format

```
🐋 NOEL WHALE ALERT

⏱ Last 1 Hour

🔴 CEX Inflow — BTC
  → 420 BTC ($43.2M) deposited to Binance
  → Potential distribution signal

🟢 CEX Outflow — ETH
  → 12,500 ETH ($48.7M) withdrawn from Coinbase
  → Accumulation pattern — bullish signal

⚡ Large On-Chain Move
  → 0x7f3a...4e9b moved $18.5M USDC
  → Destination: known DeFi yield aggregator

🧠 Smart Money
  → 3 early-mover wallets opened ETH longs in last 60 min
```

***

## Accessing Whale Alerts via MCP

**Get recent alerts:**

```
get_whale_alerts
get_whale_alerts(hours: 6)
get_whale_alerts(hours: 24)
```

Returns structured alert data including:

* Alert type (CEX inflow, outflow, on-chain movement, smart money)
* Token involved
* Amount (USD)
* Direction (bullish/bearish signal)
* Timestamp

***

## Database

Whale alerts are stored in the `whaleAlerts` table:

```
token: string
alertType: "cex_inflow" | "cex_outflow" | "large_transfer" | "smart_money"
amount: number (USD)
direction: "bullish" | "bearish" | "neutral"
description: string
detectedAt: number
telegramSent: boolean
```

***

## Configuration

Whale alerts run automatically every hour with no setup required. Telegram delivery is enabled when a bot token and chat ID are configured:

**Via MCP:**

```
set_telegram(
  userId: "your-id",
  telegramBotToken: "...",
  telegramChatId: "..."
)
```

**Via HTTP:**

```bash
curl -X POST https://valuable-fish-533.convex.site/user/telegram \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "your-id",
    "telegramBotToken": "...",
    "telegramChatId": "..."
  }'
```

Alerts are saved to the database regardless of Telegram config and remain accessible via `get_whale_alerts`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.noelclaw.fun/core-features/whale-tracking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
