Open-source pm-copy-trader project
Open-source pm-copy-trader project
I open-sourced pm-copy-trader for developers in Open-source developer tools. This post walks through what it does, how the pieces fit together, and how to run it locally.
Live demo / site: https://polymarket.com/@pmtraderadam?via=pmtraderadam
Why I built this
- Explore pm copy trader patterns in open-source developer tools
- Fork the repo as a starter template for your own project
- Contribute features, docs, or tests via pull requests
Most tutorials stop at a smart contract or a UI mockup. I wanted a complete vertical slice — wallet flow, on-chain logic, backend state, and a responsive frontend — so you can study or fork a production-shaped codebase.
What it does
- Late-window favorite snipe on BTC, ETH, SOL, XRP 5m Up/Down markets
- Live Polymarket price polling (Gamma + CLOB APIs)
- Simulated entry/exit with P/L tracking
- One position per asset per window (max 4 concurrent)
- Tunable constants in src/index.ts
- Runtime logs to console and logs.txt
- Automated copy-trading strategy execution
- Tunable constants in
src/index.ts
Architecture at a glance
- Application layer — TypeScript backend/frontend tying on-chain and off-chain flows
- Feature — Late-window favorite snipe on BTC, ETH, SOL, XRP 5m Up/Down markets
- Feature — Live Polymarket price polling (Gamma + CLOB APIs)
- Feature — Simulated entry/exit with P/L tracking
User Wallet → On-chain Program → VRF / Settlement
↓
Backend (API + WebSockets) → MongoDB / state
↓
Frontend UI (real-time)
Adjust the diagram to match your repo layout if components differ.
Tech stack
- Solana
- TypeScript
- Polymarket API
Quick start
git clone https://github.com/PMTraderAdam/pm-copy-trader.git
cd pm-copy-trader
Setup steps:
- Install dependencies (see README — typically npm install or yarn)
- Copy .env.example to .env and fill in RPC, wallet, and API keys
- Run local validator or point to devnet/mainnet as documented
- Start the backend and frontend; connect wallet and create a test room
See the full README for environment variables, deploy scripts, and test commands: https://github.com/PMTraderAdam/pm-copy-trader
Video walkthrough
- Open-source pm-copy-trader project tutorial — How to set up and run pm-copy-trader step by step
- Open-source pm-copy-trader project — Open-source pm-copy-trader project — architecture and demo walkthrough
What to explore in the repo
- Program / contract entrypoints and account models
- API routes and WebSocket event handlers
- Frontend wallet adapter and game room components
- Tests, scripts, and deployment configs
Contributing
Issues and PRs are welcome. If this helped you learn something, a ⭐ on GitHub makes it easier for others to find.
Links
- Video: https://youtube.com/watch?v=YOUR_SETUP_TUTORIAL_ID
- GitHub: https://github.com/PMTraderAdam/pm-copy-trader
- Website: https://polymarket.com/@pmtraderadam?via=pmtraderadam
Disclaimer: Educational content only. Not financial advice. Gambling and trading involve risk; use responsibly and comply with local laws.
Top comments (0)