Widgets
Copy Trading

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

  1. At least one terminal wallet unlocked (Solana or EVM depending on the chain)
  2. Sufficient native token balance for trade amounts and gas fees

Adding a Wallet

  1. Click Add Wallet in the widget header
  2. Enter the target wallet address
  3. Select the chain (SOL, ETH, BSC, or BASE)
  4. Configure the trade parameters:
FieldDescription
AmountFixed 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
LabelDisplay name for the wallet. Optional
  1. 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:

  1. Transaction ID set - Each processed transaction signature/hash is stored and persisted to localStorage
  2. Per-wallet cooldown - 10-second cooldown between trades for the same wallet
  3. Record-based dedup - Skips tokens already traded for a wallet within the last 5 minutes
  4. Historical filter - Transactions from before the wallet was added are ignored

Trade Execution

When a buy is detected:

  1. The engine creates a pending trade record
  2. Executes a swap via Jupiter (Solana) or 0x (EVM) using your terminal wallet
  3. Uses 12% default slippage (configurable per wallet via slippageBps)
  4. Fetches the entry price for the purchased token
  5. If TP/SL is configured and an entry price is available, creates on-chain orders via the OnchainOrderEngine
  6. 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:

IconStatus
Green checkmarkSuccessfully executed
Red alertFailed (error message shown)
Yellow spinnerPending 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_txs key 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