Prediction markets just hit $3.6B in volume. I wanted to know what the biggest traders were betting on — in real time. So I built WhaleTrack.
Here's how it works under the hood.
The Problem
Polymarket has a public leaderboard. But it only shows P&L totals — not what whales are currently betting on, not their recent activity, not their win rate. If you want to follow smart money, you're flying blind.
I wanted something that answered: what are the top traders doing right now?
The Stack
Vanilla JS frontend (no framework, keeps it fast)
Vercel serverless function as a backend proxy (avoids CORS issues hitting Polymarket's API directly)
Polymarket's public data API — no auth required
Step 1: Finding the Whales
Polymarket exposes a leaderboard endpoint:
https://data-api.polymarket.com/v1/leaderboard?limit=20
This returns traders ranked by P&L. I pull the top 10, grab their wallet addresses, and that's my whale list.
Step 2: Fetching Live Activity
For each whale wallet, I hit:
https://data-api.polymarket.com/activity?user={address}&limit=20
This returns their recent trades — market name, size in USDC, timestamp. I parse this into a live activity feed that refreshes every 60 seconds.
Step 3: Calculating Win Rate (the tricky part)
This one took some digging. The positions endpoint returns each position a whale holds, but figuring out won vs lost isn't obvious.
The key is the redeemable flag:
const won = positions.filter(p => p.redeemable === true).length;
const lost = positions.filter(p =>
p.currentValue === 0 && p.redeemable === false
).length;
const winRate = Math.round((won / (won + lost)) * 100);
redeemable: true = market resolved in their favour (shares worth $1)
currentValue: 0 + redeemable: false = market resolved against them
Simple once you know it — but it took a few wrong attempts with cashPnl (always negative, not useful).
Step 4: The Whale Alert Banner
The feature people love most. Every 60 seconds when activity refreshes, I check for trades over $5,000 placed in the last 10 minutes:
function checkBigTrades(activity) {
const big = activity
.filter(t => t.usdcSize >= 5000)
.sort((a, b) => b.usdcSize - a.usdcSize)[0];
if (!big) return;
const age = Math.floor(Date.now() / 1000) - big.timestamp;
if (age > 600) return; // older than 10 min, skip
showWhaleAlertBanner(big);
}
When it fires, a green banner slides down with the whale name, market, and amount. Auto-dismisses after 12 seconds.
First time I saw it fire live with a $28K bet — genuinely exciting.
Results
129+ users in the first few days
Zero ad spend
Traffic from Twitter, Reddit, Quora
What's Next
More whale wallets (suggestions welcome)
Click-through to open the same market on Polymarket directly
Email/push alerts for big trades
Check it out: whaletrack.app
All feedback welcome — especially if you spot a whale I'm missing.























