Professional-grade Ethereum whale tracking platform with ROI scoring and real-time analytics.
- π Advanced Whale Detection: Track 1000+ Ethereum whales with smart categorization
- π ROI Scoring System: Composite scoring based on performance metrics
- ποΈ Supabase Integration: PostgreSQL database with real-time capabilities
- π± Mobile-First Dashboard: NextJS + Tailwind responsive design
- π Real-time Updates: Live whale monitoring with auto-refresh
- π Full-Stack Architecture: Python backend + React frontend
- π REST API: Programmatic access to whale data
- π° Free & Open Source: No subscription fees
Frontend
- NextJS 15 (App Router)
- TypeScript
- Tailwind CSS
- Real-time data fetching
Backend
- Python 3.8+
- Supabase PostgreSQL
- RESTful API design
- Etherscan/Alchemy APIs
-
Create Supabase Project
- Go to https://supabase.com
- Sign up and create new project (free tier: 500MB)
- Wait for database to initialize (~2 minutes)
-
Get Database Credentials
- Go to Project Settings β API
- Copy Project URL and
anonpublickey
# Clone repository
git clone <your-repo-url>
cd whale-tracker
# Install dependencies
pip install -r requirements.txt
# Setup environment
cp .env.example .env
# Edit .env with your credentials# Initialize Supabase schema
python3 scripts/setup_supabase.pyAlchemy (Required)
- Visit https://www.alchemy.com/
- Create free account β New App (Ethereum Mainnet)
- Add API key to
.env
Etherscan (Required)
- Visit https://etherscan.io/apis
- Create free account β Generate API key
- Add API key to
.env
Option A: Full Stack (Recommended)
# Terminal 1: Start Python backend (default 8080)
python3 app.py --port 8080
# Terminal 2: Start NextJS frontend
cd frontend
# Optional: set backend URL for the frontend
echo "NEXT_PUBLIC_BACKEND_URL=http://localhost:8080" > .env.local
npm run devVisit http://localhost:3000 for the modern dashboard!
Option B: API Only
python3 app.pyVisit http://localhost:8080/api/whales for JSON data
We include a render.yaml Blueprint for hosting the Python backend and a daily refresh cron.
Steps
- Create a new Render Blueprint from this repo (Render β New + β Blueprint).
- In the
whale-backendservice, set env vars:SUPABASE_URL(Supabase β Settings β API)SUPABASE_SERVICE_ROLE_KEY(service role key)ETH_RPC_URL(Alchemy RPC URL) or setALCHEMY_API_KEYETHERSCAN_API_KEY(optional)ZEROX_SWAP_API_KEY(optional, 0x rate limits)ADMIN_API_TOKEN(random string to protectPOST /admin/refresh)DEV_DEBUG=0
- The cron service
whale-refresh-cronwill callhttps://<backend>/admin/refreshdaily.
- Create a Vercel project from
/frontend. - Set
NEXT_PUBLIC_BACKEND_URL=https://<your-render-backend-host>. - Deploy and visit
/smart-money.
Trigger a refresh job:
curl -X POST \
-H "Authorization: Bearer $ADMIN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"top":100,"hours":720,"price_days":90,"metrics_days":90,"activity_days":90,"time_budget":240}' \
https://<your-render-backend>/admin/refreshJob logs are stored in job_logs.
whale-tracker/
βββ frontend/ # NextJS + Tailwind frontend
β βββ src/app/ # App router pages
β βββ components/ # Reusable UI components
β βββ public/ # Static assets
βββ src/ # Python backend
β βββ services/ # Business logic layer
β β βββ whale_service.py
β β βββ roi_service.py
β βββ data/ # Data access layer
β β βββ supabase_client.py
β β βββ whale_repository.py
β βββ api/ # REST API layer
β βββ handlers.py
βββ config/ # Configuration management
βββ scripts/ # Setup and utility scripts
βββ legacy/ # Legacy code (migrated)
βββ tests/ # Test suite
- whales: Core whale data with address, balance, entity type
- whale_roi_scores: Composite ROI scoring metrics
- whale_transactions: Detailed transaction tracking
-
GET /- Dashboard UI -
GET /api/whales- Whale data with ROI scores -
GET /api/stats- Database statistics -
GET /api/scan- Trigger whale scan -
GET /health- Read-only health check (public safe) -
GET /health/db-write- Dev-only write health check (token-gated) -
GET /smart-money- Smart Money leaderboard (fallback aggregation)- Query params:
limit(default 50),min_swaps(default 10),active_days(default 30) - Example:
http://localhost:8080/smart-money?limit=50&min_swaps=10&active_days=30
- Query params:
Use the CLI to seed config and run bounded discovery without hanging:
# Seed DEX routers / CEX addresses from JSON templates
python3 scripts/smart_money_cli.py seed --routers sample_dex_routers.json --cex sample_cex_addresses.json
# Run discovery with guardrails
python3 scripts/smart_money_cli.py discover \
--limit 100 \
--hours 24 \
--max-routers 5 \
--time-budget 60
# Offline (DB-only) mode when network is constrained
python3 scripts/smart_money_cli.py discover --offline --limit 100You can also tune via environment variables in .env:
SMART_MONEY_MAX_ROUTERS_PER_RUN, SMART_MONEY_DISCOVERY_TIME_BUDGET_SEC, SMART_MONEY_REQUEST_TIMEOUT_SEC, SMART_MONEY_DISABLE_NETWORK.
Dev write-check usage
# Requires header Authorization: Bearer whale-dev-2024
curl -H "Authorization: Bearer whale-dev-2024" http://localhost:8080/health/db-writeReturns JSON with write/cleanup status and response time; rate-limited by a 60s cooldown. Do not expose in production.
Composite score calculated from:
- ROI Score (30%): Historical return performance
- Volume Score (20%): Trading volume analysis
- Consistency Score (20%): Performance consistency
- Risk Score (15%): Risk-adjusted returns
- Activity Score (10%): Transaction frequency
- Efficiency Score (5%): Gas optimization
# Run tests
python3 -m unittest -v tests/test_basic.py
# Development server
python3 app.py --port 8080
# Check configuration
python3 app.py --config# Supabase (Required)
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_anon_key
# API Keys (Required)
ETHERSCAN_API_KEY=your_key
ALCHEMY_API_KEY=your_key
# Application Settings
HOST=localhost
PORT=8080
WHALE_THRESHOLD=1000- Supabase Free Tier: 500MB storage, 2M API requests/month
- API Rate Limits: Etherscan 5 req/sec, Alchemy varies by plan
- Recommended: Start with 50-100 whales, scale based on usage
We eliminated SQLite to provide a modern, scalable architecture:
β
Real-time Updates: Live whale monitoring
β
Proper Relationships: Foreign keys, constraints, transactions
β
Auto-scaling: Handle thousands of whales
β
Zero Maintenance: Managed backups, updates
β
Team Collaboration: Shared dev/staging/prod environments
β
Edge Functions: Future extensibility
Legacy Migration: Old SQLite files are in /legacy/databases/ for reference.