Automatically mirror any wallet's positions on 01.xyz in real-time.
Built with the @n1xyz/nord-ts SDK. Supports position open/close/flip/adjust with configurable capital ratio.
- Real-time sync — subscribes to target wallet via SDK stream
- Parallel execution — all orders fire simultaneously
- Position diff engine — open, close, flip, and size-adjust
- Periodic verify — re-syncs every 5s to catch missed events
- Precision handling — respects each market's
sizeDecimals
- Node.js v25+
- A funded 01.xyz account
- Solana wallet private key (base58)
git clone https://github.com/omgmad/01-copy-bot
cd 01-copy-bot
npm installApply the required SDK patch after npm install:
# Find the line (usually ~87412)
grep -n "rawResp\|arrayBuffer" node_modules/@n1xyz/nord-ts/dist/index.common.js | grep "rawResp"
# Apply fix (replace LINE_NUMBER with actual line)
sed -i 'LINE_NUMBERs/.*/ const rawResp = new Uint8Array(await response.response.arrayBuffer());/' \
node_modules/@n1xyz/nord-ts/dist/index.common.jscp .env.example .envPRIVATE_KEY=your_base58_private_key
TARGET_WALLET=wallet_address_to_copy
CAPITAL_RATIO=0.01
CLUSTER=mainnet
RPC_URL=https://solana-rpc.publicnode.comYour capital divided by the target's margin in use.
Example: You have $100, target uses $10,000 margin
CAPITAL_RATIO = 100 / 10000 = 0.01
npm run botTo run multiple bots (different wallets) simultaneously:
# Terminal 1
screen -S bot1
cd ~/01-copy-bot && npm run bot
# Terminal 2
screen -S bot2
cd ~/01-copy-bot-2 && npm run bot
# Detach: Ctrl+A, D
# Reattach: screen -r bot1Target wallet stream
│
▼
computeDiff()
┌─────┴──────┐
toOpen toClose toFlip toAdjust
│ │ │ │
└───────┴───────┴────────┘
│
applyDiff() ← parallel execution
│
periodicVerify() ← every 5s
src/
├── index.ts entry point
├── engine.ts copy logic, diff engine
├── client.ts SDK wrapper, order placement
├── config.ts env config
├── logger.ts colored terminal output
└── types.ts TypeScript interfaces
bigint: Failed to load bindingswarning is harmless — pure JS fallback is used- Re-apply the SDK patch after every
npm install - Use the 01 Monitor dashboard to watch live performance