DEV Community

Manpreet Brar
Manpreet Brar

Posted on

How I built a real-time whale tracker for Polymarket using their public API

Polymarket has a public data API that almost nobody talks about. I used it to build WhaleTrack — a live dashboard that tracks what the biggest traders on the platform are betting on.

The stack:

Vanilla JS frontend (no framework — just fast)
Vercel serverless functions to proxy all API calls (avoids CORS, keeps keys server-side)
Polymarket's data-api.polymarket.com for positions, leaderboard, and activity
The interesting parts:

The win rate calculation was tricky. Polymarket doesn't give you a clean "won/lost" field. You have to infer it:

redeemable === true = won (market resolved in their favour)
currentValue === 0 && redeemable === false = lost
Everything else = still open
Also learned the hard way that slug (market-level) and eventSlug (event-level) are different things on Polymarket. Market slugs 404 on polymarket.com/event/. Took me longer than I'd like to admit to figure that out.

Live at whaletrack.app — open to questions about the API or architecture.

Top comments (2)

Collapse
 
frank_signorini profile image
Frank •

How did you handle API rate limiting for WhaleTrack, and are you planning to open source the project? I'd love to swap ideas on this.

Collapse
 
manpreet_brar_264e408885a profile image
Manpreet Brar •

Hey Frank! Thanks for the comment 🙌

Rate limiting: Polymarket's public data API is pretty generous — no official rate limits documented. I poll every 5 minutes per whale wallet which keeps it well within safe territory. The only gotcha was parallelizing too many wallet fetches at once, so I batch them with Promise.allSettled.

Open source: Not planning to fully open source it right now since I'm actively building features, but happy to share specific parts — the win rate calculation logic was the trickiest bit. Drop your GitHub and let's swap notes!