A real Polymarket data dashboard with local private predictions. Built with plain HTML/CSS/JS — no frameworks, no npm needed.
- Open VS Code
- Go to File → Open Folder
- Select the
polymarket-dashboardfolder
- Press Ctrl+Shift+X (Extensions panel)
- Search: Live Server
- Install the one by "Ritwick Dey"
- Right-click
index.htmlin the file explorer - Click "Open with Live Server"
- Your browser opens at http://127.0.0.1:5500
That's it! You should see live markets from Polymarket loading in.
Browsers block requests to external APIs from local files. Live Server fixes this for most cases, but if you still get an error:
Option A — Chrome with CORS disabled (quick test only):
- Close all Chrome windows
- Open Terminal and run:
- Windows:
chrome.exe --disable-web-security --user-data-dir="C:/tmp" - Mac:
open -na "Google Chrome" --args --disable-web-security --user-data-dir="/tmp/chrome"
- Windows:
Option B — Use a CORS proxy (safe for development): In index.html, find this line:
const res = await fetch('https://gamma-api.polymarket.com/markets?...');
Replace it with:
const res = await fetch('https://corsproxy.io/?https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=50&order=volume&ascending=false');
- Live market data from Polymarket's Gamma API
- Category filter sidebar (Politics, Crypto, Sports, Economics, Science)
- Search + sort (by volume, probability, newest)
- Local private predictions stored in your browser
- Simulated payout calculator
- Positions panel tracking your bets
- Stage 2: Node.js backend + real user accounts + database
- Stage 3: Zama fhEVM smart contracts — predictions encrypted on-chain, invisible to everyone including the blockchain itself
polymarket-dashboard/
index.html ← The entire app (one file!)
README.md ← This file
- Base URL: https://gamma-api.polymarket.com
- Endpoint: GET /markets?active=true&closed=false&limit=50
- No API key needed for reading market data
- Docs: https://docs.polymarket.com
- Edit the colors in the :root CSS variables (top of index.html)
- Change the number of markets loaded (limit=50 → limit=100)
- Add a new filter category
- Learn JavaScript basics: https://javascript.info
- Next: Stage 2 (Node.js + Express backend)