Skip to content

A whale watcher for polymarket. Part of the broader forex-crypto TradeRocker project.

Notifications You must be signed in to change notification settings

abraham-ny/TradeRocker-PM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polymarket Whale Tracker

A Wall Street-style terminal interface for tracking large transactions (whales) on Polymarket.

Features

  • Real-time Whale Tracking: Monitors transactions over $10,000
  • Classic Terminal UI: Old-school forex/Bloomberg terminal aesthetic
  • Market Statistics: Live volume and market data
  • Auto-refresh: Updates every 60 seconds
  • Direct Links: Click through to Polymarket profiles and markets

Tech Stack

  • Frontend: Plain HTML, CSS, JavaScript (no frameworks)
  • Backend: Python Flask
  • Deployment: Netlify (frontend) + Render (backend)

Deployment Instructions

Backend (Render)

  1. Create a new Web Service on Render
  2. Connect your GitHub repository
  3. Configure:
    • Root Directory: backend
    • Build Command: pip install -r requirements.txt
    • Start Command: gunicorn app:app
    • Instance Type: Free tier works fine
  4. Deploy and copy the URL (e.g., https://your-app.onrender.com)

Frontend (Netlify)

  1. Open frontend/app.js
  2. Update the API_URL in the CONFIG object:
    const CONFIG = {
        API_URL: 'https://your-backend-url.onrender.com', // Your Render URL here
        REFRESH_INTERVAL: 60000,
        POLYMARKET_BASE_URL: 'https://polymarket.com'
    };
  3. Deploy to Netlify:
    • Drag and drop the frontend folder, OR
    • Connect your GitHub repository
    • Publish directory: frontend
    • No build command needed

Configuration

Whale Threshold

The default whale threshold is $10,000. To change it:

Backend (backend/app.py):

WHALE_THRESHOLD = 10000  # Change this value

Refresh Rate

Frontend (frontend/app.js):

REFRESH_INTERVAL: 60000, // milliseconds (60000 = 1 minute)

API Endpoints

GET /api/whale-trades

Returns recent whale transactions over the threshold.

Response:

[
  {
    "id": "trade_id",
    "timestamp": "2026-01-30T12:00:00",
    "account": {
      "address": "0x...",
      "username": "trader123"
    },
    "moneyMoved": 15000.00,
    "market": {
      "title": "Will X happen?",
      "slug": "market-slug",
      "id": "condition_id"
    },
    "side": "BUY",
    "outcome": "YES",
    "price": 0.65,
    "size": 23076.92,
    "potentialWin": 8076.92,
    "impliedOdds": "65.0%"
  }
]

GET /api/market-stats

Returns overall market statistics and top markets.

Response:

{
  "totalVolume": 1234567.89,
  "activeMarkets": 50,
  "topMarkets": [
    {
      "title": "Market question",
      "volume": 100000.00,
      "slug": "market-slug"
    }
  ]
}

GET /health

Health check endpoint.

Data Sources

  • Polymarket CLOB API: https://clob.polymarket.com
  • Polymarket Gamma API: https://gamma-api.polymarket.com

Notes

  • Free Tier Limitations: Render free tier spins down after inactivity. First request after inactivity may be slow (30-60 seconds).
  • Rate Limiting: The backend implements caching to reduce API calls to Polymarket.
  • No API Key Required: The Polymarket public APIs don't require authentication for read operations.

Customization

Colors

Edit frontend/style.css:

  • Green: #00ff00 (profits, live status)
  • Red: #ff0000 (losses, disconnected)
  • Yellow: #ffff00 (account names, headers)
  • Cyan: #00ccff (prices)

Whale Threshold Display

The threshold is displayed in the stats panel. Update in frontend/index.html:

<div class="stat-label">WHALE THRESHOLD</div>
<div class="stat-value">$10,000</div>

Troubleshooting

Backend not responding

  • Check Render logs
  • Verify the backend URL is correct in app.js
  • Free tier may need 30-60 seconds to spin up

No trades showing

  • Polymarket may have low activity
  • Check browser console for errors
  • Verify CORS is enabled (already configured in Flask)

CORS errors

  • Ensure backend is deployed on Render (has proper HTTPS)
  • Check that flask-cors is installed

License

MIT

About

A whale watcher for polymarket. Part of the broader forex-crypto TradeRocker project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published