Skip to content

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

CabalSpy — Leaderboard

The CabalSpy trader leaderboard, built on the REST API in TypeScript. It ranks KOL, Smart Money and Whale wallets by PnL, win rate, trades, volume or average hold, across Solana, BNB, Base and ETH. The top three are shown as podium cards, the rest in a sortable, searchable table.

It uses one endpoint:

  • GET /v1/wallet/leaderboard?blockchain=&type=&period= — returns the ranked wallets, each with a profile, period stats and win-rate distribution.

Run it

npm install
npm run dev

Then paste your API key and click Load leaderboard. Get a key at https://apidashboard.cabalspy.xyz. Switch chain, wallet type and period with the controls; sort and search update instantly without refetching.

Files

  • src/config.ts — public REST base URL, chain map, per-chain wallet types. No secrets.
  • src/lib/api.ts — fetchLeaderboard plus normalizeEntry (flattens profile + period_stats + win-rate into one row).
  • src/lib/format.ts — USD / native / percentage / hold formatting.
  • src/types/api.ts — typings for the endpoint response.
  • src/ui/podium.ts — the top-three trader cards.
  • src/ui/table.ts — the ranked leaderboard table.
  • src/main.ts — state, fetching, sorting, search, and chain/type/period controls.

Notes

  • Wallet types depend on the chain: Solana has KOL, Smart Money and Whale; BNB and Base have KOL and Smart Money; ETH has KOL only. The type buttons adjust automatically.
  • Sorting and search run client-side on the loaded data, so they are instant.
  • Changing chain, type or period refetches from the API.
  • Clicking a trader opens their wallet in the chain explorer.

Releases

Packages

Contributors

Languages