Automated copy trading agent that mirrors a leader account's positions onto your own wallet with configurable risk controls. The agent listens for the leader's fills, derives target exposure per market, and places IOC limit orders to sync the follower account while enforcing leverage, notional, and slippage caps.
This code is not audited and is provided as is. Use at your own risk.
Please deposit at your own risk, we only copytrade other users, no gurantees on their performance. We have max leverage limit at 10x to avoid getting liquidated. Following vaults are copytrading: AlphaArena Agents by Nof1.ai.
Portal: SigmaArena
- DeepSeek V3.1: Deposit Into Vault | Live Logs | Portfolio Dashboard
- Qwen3 Max: Deposit Into Vault | Live Logs | Portfolio Dashboard
- Grok 4: Deposit Into Vault | Live Logs | Portfolio Dashboard
- Inverse GPT-5: Deposit Into Vault | Live Logs | Portfolio Dashboard
- Inverse Gemini 2.5 Pro: Deposit Into Vault | Live Logs | Portfolio Dashboard
- Hyperliquid — Full support (WebSocket + HTTP API)
- Lighter — Planned
- Aster — Planned
- WebSocket subscription to leader fills with automatic reconnection.
- Periodic reconciliation against on-chain
clearinghouseStatesnapshots. - Risk-aware position sizing via copy ratio, leverage, notional, and slippage limits.
- Shared state engine for leader/follower positions and account metrics.
- Optional vault routing: point the follower at a vault and orders will append the vault address automatically.
- TypeScript codebase with typed Hyperliquid SDK integration.
- Install dependencies:
npm install
- Copy the sample environment and fill in your keys:
cp examples/.env.example .env
LEADER_ADDRESS: wallet you want to mirror.FOLLOWER_PRIVATE_KEY: private key for your follower API wallet.FOLLOWER_VAULT_ADDRESS(optional): set if your follower trades through a vault instead of the base account.- Adjust risk knobs (
COPY_RATIO,MAX_LEVERAGE, etc.) as needed. - Set
INVERSE=trueto inverse copytrade (leader long → follower short, and vice versa).
- Build the project:
npm run build
- Run the daemon:
For quick iteration you can use
npm start
npm run dev, which runs the TypeScript entrypoint directly viats-node.
Build the image and run with a bind-mounted .env file:
docker build -t copytrading-agent .
docker run --rm \
--name copytrading-agent \
-v $(pwd)/.env:/app/.env:ro \
copytrading-agentAlternatively, set envs via --env-file (dotenv in the app also loads .env if present):
docker run --rm \
--env-file ./.env \
copytrading-agentEigenCloud (via EigenX CLI) allows deploying this trading agent in a Trusted Execution Environment (TEE) with secure key management.
- Allowlisted Ethereum account (Sepolia for testnet). Request onboarding at EigenCloud Onboarding.
- Docker installed.
- Sepolia ETH for deployments.
curl -fsSL https://eigenx-scripts.s3.us-east-1.amazonaws.com/install-eigenx.sh | bashcurl -fsSL https://eigenx-scripts.s3.us-east-1.amazonaws.com/install-eigenx.ps1 | powershell -docker login
eigenx auth login # Or eigenx auth generate --store (if you don't have a eth account, keep this account separate from your trading account)From the project directory:
cp .env.example .env
# Edit .env: set LEADER, etc
eigenx app deployeigenx app info --watch
eigenx app logs --watchEdit code or .env, then:
eigenx app upgrade <app-name>For full CLI reference, see the EigenX Documentation.
- No automated tests are bundled yet. Add your own checks or dry-run on Hyperliquid testnet before risking capital.
src/index.ts— entrypoint wiring transports, subscriptions, reconciliation loop, and trade executor.src/config— environment loading and risk configuration.src/clients— Hyperliquid SDK client/transport factories.src/domain— shared trader state logic plus leader/follower specializations.src/services— subscriptions, market metadata, reconciler, and order executor.examples/.env.example— reference environment variables.
- The repo uses ESM modules (
"type": "module"); Node 20+ is recommended. - Network access and trading actions happen against the URLs defined in the Hyperliquid SDK transports. Set
HYPERLIQUID_ENVIRONMENT=testnetto dry-run safely.
