Copy Trading (Legacy)
DEPRECATED — fully superseded by Trading Tools v2.
The entire /opt/copytrading system (package alphacopybot) was retired in the
v1 → v2 atomic cutover on 2026-05-31. The execution engine, the Rust read API,
and the fundedCheck cron are all dead. Do not redeploy or build features on it.
What replaced it
All copy-trading now runs on Trading Tools v2
(/opt/tradingtools-v2, root PM2, tt-* processes), with the control plane exposed at
tradingv2.polyinsiders.com. The only thing carried over from this repo into v2 was the
websocket listener — everything else in v2 is a fresh, queue-backed, crash-isolated build.
User-facing copy-trade API routes are documented under
Copy Trading API Routes (backend /api/copytrade →
v2 control-api :9110).
The cutover (2026-05-31)
| Step | Result |
|---|---|
Stop old copy/sell workers (ct-buy, ct-sell) | Stopped — all buy/sell/confirm/watcher OS procs gone |
| Migrate live subscriptions | 212 subs activated on v2, readback verified 212/212, no double-copy |
| Old copy path | Frozen — newest copy_trade_logs row is 2026-04-20 (engine was already idle pre-cutover) |
Source: /opt/tradingtools-v2/docs/migration_dryrun_2026-05-30/cutover_report_2026-05-31.md.
Deprecated deployment (safe to retire)
| Instance | Status |
|---|---|
Repo /opt/copytrading (alphacopybot) | Dead — do not redeploy |
ct-buy, ct-sell (ubuntu PM2) | Stopped at cutover |
pi-copytrading (ubuntu PM2) | Stopped (legacy) |
ct-api — Rust read API (ubuntu PM2) | Online but unused — no longer the source of truth, safe to stop |
fundedCheck cron | Harmless — reads pUSD, flips is_funded, sends TG notifs; writes only the old copy_trade_subscriptions table. Cannot copy/trade. Safe to retire. |
rustcopytrading.polyinsiders.com | Still resolves (returns 404 on /); points at the dead ct-api |
Old architecture (historical reference)
The legacy system was a TypeScript + Rust split:
Polymarket WS → listener.ts → subscriptionsWatcher
→ buy: buyWorker → executionWorker → confirmationWorker (BullMQ)
→ sell: tpslWorker / mirrorWorker → executionWorker → confirmationWorker
api/ (Rust, cargo) → rustcopytrading.polyinsiders.com (read API: history / PnL / stats)
mirror/ , dashboard/ , prisma/ (mirror trading + dashboards)Cleanup TODO
The frontend (/opt/sigmaboy-fe-src) still ships a legacy Rust client
src/services/rustCopyTradeApi.ts (+ copyTradeUnified.ts) pointing at
rustcopytrading.polyinsiders.com, imported by the Copytrade dashboard components
(Dashboard, WalletsTable, CumulativePnl, TpSlManager, charts, useCopyTradeData).
These reads must move onto the v2 / backend surface before ct-api is stopped.