npm run collect:full # Full scan: all active events (~15 min)
npm run collect:update # Incremental: top 500 events (<1 min)
npm run collect:purge # Remove trades older than 35 days
npm run collect:stats # Print database stats
npm run export-snapshot # Export static JSON for deployment
Daily full scan + purge at 3:07am:
7 3 * * * /path/to/node npx tsx /path/to/scripts/collect.ts full && npx tsx /path/to/scripts/collect.ts purge
Full daily scans ensure consistent coverage across days, enabling reliable day-over-day comparison as data accumulates.
Static export to GitHub Pages:
npm run export-snapshot # Generate public/data/snapshot.json
git add -A && git commit -m "data: update" && git push
# GitHub Actions auto-deploys to Pages
GET https://gamma-api.polymarket.com/eventsGET https://data-api.polymarket.com/trades?eventId={id}&limit=1000No API key required. Public endpoints.
Snapshot approach: Each event yields its latest 1,000 trades. High-volume events cover hours; low-volume events cover weeks. This is a cross-sectional snapshot, not a complete census. The true number of active wallets is likely higher.
Activity-weighted: Wallets with higher trading frequency appear more prominently. Volume figures are observed within the sample, not lifetime totals. Treat as lower-bound estimates.
Bot filtering: Wallets averaging >100 trades/day are excluded. This catches most automated traders but may miss sophisticated bots or falsely flag very active humans.
Gini coefficient: Calculated on observed volume distribution. The extreme value (0.91) reflects both genuine market inequality and sampling bias toward active traders.