I just shipped one-click copy trading on WhaleTrack — here's
the architecture that makes it work without ever touching a
private key.
The problem: Polymarket's CLOB API needs two auth layers:
Most tutorials store private keys server-side. That's a security
nightmare.
My solution — split architecture:
The user's private key never leaves MetaMask. Ever.
The flow:
GET /api/trade-params → unsigned order struct
↓
MetaMask eth_signTypedData_v4
↓
POST /api/trade → HMAC proxy → clob.polymarket.com/order
Built on Vercel serverless + Upstash KV for credential storage.
Full writeup + code breakdown in the comments.
👉 whaletrack.app — live and free