MemeLexAll Build Packs
BUILD PACK

Copy-trade mirror

Mirror a Hyperliquid or Polymarket trader with strict size caps.

Build it in MemeLex →

What it builds

TypeScript. Poll the leader's positions (Hyperliquid info clearinghouseState, or Polymarket data API positions), diff, scale by COPY_RATIO, clamp to MAX_POSITION_USD, skip if DAILY_LOSS_LIMIT hit, place orders only when LIVE_TRADING=true. Tests for diff + sizing + caps.

Sample project

files
src/index.ts
src/leader.ts
src/sizing.ts
src/executor.ts
test/sizing.test.ts
config.json
.env.example
package.json
README.md
sample output
[PAPER] leader +2.0 SOL-PERP → mirror +0.20 (capped at $500) · kill switch: off

MemeLex generates code, not trade calls. Not financial advice.