What Are Whale Alerts?
Whale alerts track large token movements on-chain. When a wallet moves millions of dollars worth of SOL or tokens, it often signals upcoming price action.
Building It
Here's the core architecture for a Solana whale tracker in Node.js:
const { Connection, PublicKey } = require('@solana/web3.js');
const WHALE_THRESHOLD_SOL = 100; // Alert on 100+ SOL movements
const WATCHED_WALLETS = new Map(); // wallet -> label
async function monitorWallet(connection, wallet, label) {
const pubkey = new PublicKey(wallet);
connection.onAccountChange(pubkey, async (accountInfo) => {
const balanceSOL = accountInfo.lamports / 1e9;
console.log(`[WHALE] ${label}: Balance changed to ${balanceSOL} SOL`);
// Check recent transactions
const sigs = await connection.getSignaturesForAddress(pubkey, { limit: 1 });
if (sigs.length > 0) {
const tx = await connection.getParsedTransaction(sigs[0].signature);
analyzeTransaction(tx, label);
}
});
}
function analyzeTransaction(tx, label) {
if (!tx?.meta) return;
const preBalances = tx.meta.preBalances;
const postBalances = tx.meta.postBalances;
const diff = (postBalances[0] - preBalances[0]) / 1e9;
if (Math.abs(diff) >= WHALE_THRESHOLD_SOL) {
const action = diff > 0 ? 'RECEIVED' : 'SENT';
console.log(`🐋 ${label} ${action} ${Math.abs(diff).toFixed(2)} SOL`);
// Send alert via Telegram, Discord webhook, etc.
}
}
Full Implementation
My Solana DeFi Toolkit includes a production-ready whale tracker with:
- Multi-wallet monitoring — track unlimited wallets
- Token transfer detection — not just SOL, any SPL token
- Telegram notifications — instant alerts to your phone
- Historical analysis — track patterns over time
Also in the Toolkit
The DeFi Toolkit includes 10 production Node.js scripts:
- Wallet Monitor — real-time balance tracking
- Token Scanner — analyze any SPL token
- Jupiter Swap — execute swaps programmatically
- Pump.fun Monitor — track new token launches
- Whale Tracker — large movement alerts
- Portfolio Tracker — multi-wallet P&L
- Bulk Transfer — batch SOL/token sends
- Airdrop Checker — check eligibility across protocols
- NFT Holder Snapshot — export holder lists
- RPC Benchmark — test endpoint performance
Free Bot Alternative
If you just want whale alerts without running code, my Telegram bot has a /whale command that does it all for you.
Get the toolkit: devtools-site-delta.vercel.app/sol-defi-toolkit
Top comments (0)