Copy Trading
The Copy Trading widget monitors target wallets for token purchases and automatically mirrors them using your terminal wallet. Supports Solana and EVM chains (Ethereum, BSC, Base).
Features
- Multi-Chain Support - Solana, Ethereum, BSC, and Base
- Automatic Mirroring - Detects buys and executes matching swaps
- Configurable Size - Set a fixed native token amount per wallet (SOL, ETH, BNB)
- Auto TP/SL - Optionally attach take-profit and stop-loss orders to each copy trade
- Deduplication - Prevents duplicate trades across refreshes and cooldown windows
- Event Log - View recent copy trade history with status indicators
Requirements
- At least one terminal wallet unlocked (Solana or EVM depending on the chain)
- Sufficient native token balance for trade amounts and gas fees
Adding a Wallet
- Click Add Wallet in the widget header
- Enter the target wallet address
- Select the chain (SOL, ETH, BSC, or BASE)
- Configure the trade parameters:
| Field | Description |
|---|---|
| Amount | Fixed amount in native token (SOL/ETH/BNB) to spend per detected buy |
| TP % | Take-profit percentage (e.g. 20 = sell at +20%). Optional |
| SL % | Stop-loss percentage (e.g. 10 = sell at -10%). Optional |
| Label | Display name for the wallet. Optional |
- Click Add
For Solana wallets, a Helius webhook is automatically registered to enable faster detection.
Managing Wallets
Each watched wallet displays:
- Label and truncated address (click to copy)
- Chain badge with color indicator
- Trade size in native token
- TP/SL percentages if configured
Actions
- Toggle (power icon) - Enable or disable monitoring without removing the wallet
- Delete (trash icon) - Remove the wallet and unregister any webhooks
The header shows how many wallets are currently active.
Engine Control
The copy trade engine runs as a background polling loop. Toggle it with the ON/OFF button in the widget header.
- ON (green) - Engine is actively polling for new transactions
- OFF (grey) - Engine is stopped; no detection or execution occurs
The engine auto-starts on page load if you have enabled wallets.
How Detection Works
Solana
The engine polls the /api/copy-trade/solana-poll endpoint every 750ms. This endpoint checks recent transactions for each watched wallet address using Solana RPC, looking for token buys. Transaction signatures are tracked to avoid reprocessing.
EVM (Ethereum, BSC, Base)
The engine polls eth_getLogs via RPC every 2 seconds, looking for ERC-20 Transfer events where the watched wallet is the recipient. Well-known stablecoins (USDC, USDT, DAI) are automatically filtered out to avoid false triggers. A block cursor tracks the last checked block per wallet.
Deduplication
Multiple layers prevent duplicate trades:
- Transaction ID set - Each processed transaction signature/hash is stored and persisted to localStorage
- Per-wallet cooldown - 10-second cooldown between trades for the same wallet
- Record-based dedup - Skips tokens already traded for a wallet within the last 5 minutes
- Historical filter - Transactions from before the wallet was added are ignored
Trade Execution
When a buy is detected:
- The engine creates a pending trade record
- Executes a swap via Jupiter (Solana) or 0x (EVM) using your terminal wallet
- Uses 12% default slippage (configurable per wallet via
slippageBps) - Fetches the entry price for the purchased token
- If TP/SL is configured and an entry price is available, creates on-chain orders via the OnchainOrderEngine
- Sends a notification with a DexScreener link and plays a sound
Copy trading uses high default slippage (12%) to handle meme coins with thin liquidity. For established tokens, consider setting a custom slippageBps value.
Event Log
The Recent Trades section at the bottom of the widget shows the last 50 copy trades:
| Icon | Status |
|---|---|
| Green checkmark | Successfully executed |
| Red alert | Failed (error message shown) |
| Yellow spinner | Pending execution |
Each entry shows:
- Token symbol and chain
- Amount in native token
- TP/SL order status (if applicable)
- Timestamp
Notifications
Successful copy trades generate:
- A high-priority notification with trade details and a DexScreener link
- A success sound alert
- Messages forwarded to configured integrations (Discord, Telegram)
Failed trades generate an error notification with the failure reason.
Troubleshooting
No Trades Detected
- Verify the engine is ON (green indicator in header)
- Ensure the wallet address is correct and the chain matches
- Check that the target wallet is actually making token buys (not just transfers)
- For Solana, confirm the Helius API is accessible
Trade Execution Failed
- Ensure your terminal wallet has sufficient native token for the trade amount plus gas
- Check that the terminal wallet is unlocked
- Verify the token has sufficient liquidity for the configured amount
- Try increasing slippage for low-liquidity tokens
Duplicate Trades
- The engine deduplicates across refreshes using localStorage
- If you see duplicates, clear the
cube_ct_processed_txskey from localStorage
TP/SL Not Created
- Entry price must be fetchable from DexScreener or the internal price API
- If the token is too new to have price data, TP/SL creation is skipped with a warning