惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
罗磊的独立博客
月光博客
月光博客
IT之家
IT之家
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
小众软件
小众软件
C
Check Point Blog
B
Blog RSS Feed
H
Help Net Security
博客园 - 司徒正美
L
LangChain Blog
MongoDB | Blog
MongoDB | Blog
B
Blog
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How I Built a Real-Time Whale Tracker for Polymarket in a...
Manpreet Brar · 2026-06-29 · via DEV Community

Manpreet Brar

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.