Copy Trading logo

Copy Trading

CommunityPopular
alsk1992
copy-trading

Automatically copy trades from successful wallets on Polymarket and crypto

Overview

Publisheralsk1992
RepositoryCloddsBot
Skill namecopy-trading
Stars
2.8K
Forks
336
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by alsk1992 on GitHub. Read the source before you install it.

Installation

Install the Copy Trading AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alsk1992/CloddsBot.git /tmp/CloddsBot
mkdir -p .claude/skills
cp -r /tmp/CloddsBot/src/skills/bundled/copy-trading .claude/skills/copy-trading
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Copy Trading in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Copy Trading on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Copy Trading is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Copy Trading - Complete API Reference

Automatically mirror trades from successful wallets with configurable sizing, delays, and risk controls.

Features

  • Follow whale wallets on Polymarket and crypto chains
  • Configurable sizing: Fixed, proportional, or % of portfolio
  • Trade delay to avoid detection and front-running
  • Risk limits: Max position, daily loss limits
  • Stop-loss / Take-profit monitoring with auto-exit

Chat Commands

Following Wallets

/copy follow <address>                      # Start following a wallet
/copy follow 0x1234... --size 100           # Follow with $100 fixed size
/copy follow 0x1234... --size 50%           # Follow with 50% of their size
/copy follow 0x1234... --delay 30           # 30 second delay before copying

/copy unfollow <address>                    # Stop following
/copy list                                  # List followed wallets
/copy status                                # Show copy trading status

Sizing Modes

/copy size <address> fixed 100              # Always trade $100
/copy size <address> proportional 0.5       # 50% of their size
/copy size <address> portfolio 5%           # 5% of your portfolio

Risk Controls

/copy limits --max-position 1000            # Max $1000 per position
/copy limits --daily-loss 500               # Stop after $500 daily loss
/copy limits --max-trades 20                # Max 20 trades per day

/copy sl <address> 10%                      # 10% stop-loss on copies
/copy tp <address> 20%                      # 20% take-profit on copies

Discovery

/copy top 10                                # Top 10 traders to copy
/copy top 10 --min-winrate 60               # Min 60% win rate
/copy top 10 --min-volume 100000            # Min $100k volume
/copy analyze <address>                     # Analyze a trader's performance

TypeScript API Reference

Create Copy Trading Service

typescript
import { createCopyTradingService } from 'clodds/trading/copy-trading';

const copyTrader = createCopyTradingService({
  // Polymarket credentials
  polymarket: {
    apiKey: process.env.POLY_API_KEY,
    apiSecret: process.env.POLY_API_SECRET,
    passphrase: process.env.POLY_API_PASSPHRASE,
    privateKey: process.env.PRIVATE_KEY,
  },

  // Default settings
  defaults: {
    sizingMode: 'proportional',
    sizingValue: 0.5,           // 50% of their size
    delaySeconds: 15,           // 15s delay
    maxPositionSize: 1000,      // $1000 max
    stopLossPct: 10,            // 10% stop-loss
    takeProfitPct: 25,          // 25% take-profit
  },

  // Risk limits
  limits: {
    maxDailyLoss: 500,
    maxDailyTrades: 20,
    maxTotalExposure: 5000,
  },
});

Follow Wallets

typescript
// Follow a wallet with default settings
await copyTrader.follow('0x1234...');

// Follow with custom settings
await copyTrader.follow('0x1234...', {
  sizingMode: 'fixed',
  sizingValue: 100,            // $100 per trade
  delaySeconds: 30,            // 30s delay
  stopLossPct: 15,             // 15% stop-loss
  takeProfitPct: 30,           // 30% take-profit

  // Filters
  minTradeSize: 50,            // Only copy trades > $50
  maxTradeSize: 5000,          // Skip trades > $5000
  markets: ['politics'],       // Only copy politics markets
});

// Unfollow
await copyTrader.unfollow('0x1234...');

// List followed
const followed = await copyTrader.listFollowed();

Sizing Modes

typescript
// Fixed: Always trade same dollar amount
await copyTrader.follow(address, {
  sizingMode: 'fixed',
  sizingValue: 100,  // Always $100
});

// Proportional: Percentage of their trade size
await copyTrader.follow(address, {
  sizingMode: 'proportional',
  sizingValue: 0.5,  // 50% of their size
});

// Portfolio: Percentage of your portfolio
await copyTrader.follow(address, {
  sizingMode: 'portfolio',
  sizingValue: 0.05,  // 5% of portfolio per trade
});

Event Handling

typescript
copyTrader.on('trade_copied', (event) => {
  console.log(`Copied ${event.side} on ${event.market}`);
  console.log(`Original: $${event.originalSize}, Copied: $${event.copiedSize}`);
});

copyTrader.on('stop_loss_triggered', (event) => {
  console.log(`Stop-loss hit on ${event.market}`);
  console.log(`Loss: $${event.loss}`);
});

copyTrader.on('take_profit_triggered', (event) => {
  console.log(`Take-profit hit on ${event.market}`);
  console.log(`Profit: $${event.profit}`);
});

copyTrader.on('limit_reached', (event) => {
  console.log(`Limit reached: ${event.type}`);
});

Start/Stop

typescript
// Start copy trading (monitors followed wallets)
await copyTrader.start();

// Stop copy trading
await copyTrader.stop();

// Get status
const status = copyTrader.getStatus();
console.log(`Following: ${status.followedCount} wallets`);
console.log(`Today's P&L: $${status.dailyPnl}`);
console.log(`Active positions: ${status.activePositions}`);

Find Best Traders

typescript
import { findBestAddressesToCopy } from 'clodds/trading/copy-trading';

// Find top traders
const topTraders = await findBestAddressesToCopy({
  minWinRate: 0.6,           // 60%+ win rate
  minVolume: 100000,         // $100k+ volume
  minTrades: 50,             // 50+ trades
  timeframeDays: 30,         // Last 30 days
  limit: 10,                 // Top 10
});

for (const trader of topTraders) {
  console.log(`${trader.address}`);
  console.log(`  Win rate: ${(trader.winRate * 100).toFixed(1)}%`);
  console.log(`  Volume: $${trader.totalVolume.toLocaleString()}`);
  console.log(`  P&L: $${trader.pnl.toLocaleString()}`);
  console.log(`  Trades: ${trader.tradeCount}`);
}

Analyze Trader

typescript
const analysis = await copyTrader.analyzeTrader('0x1234...');

console.log(`Win rate: ${analysis.winRate}%`);
console.log(`Avg trade size: $${analysis.avgTradeSize}`);
console.log(`Best market: ${analysis.bestMarket}`);
console.log(`Worst market: ${analysis.worstMarket}`);
console.log(`Avg hold time: ${analysis.avgHoldTime} hours`);
console.log(`Sharpe ratio: ${analysis.sharpeRatio}`);

Risk Management

Stop-Loss Monitoring

Copy trading includes automatic stop-loss monitoring with 5-second price polling:

typescript
// Configure stop-loss per followed wallet
await copyTrader.follow(address, {
  stopLossPct: 10,  // Exit at 10% loss
});

// Or set global stop-loss
copyTrader.setGlobalStopLoss(15);  // 15% for all positions

Take-Profit Monitoring

typescript
// Configure take-profit per followed wallet
await copyTrader.follow(address, {
  takeProfitPct: 25,  // Exit at 25% profit
});

// Trailing take-profit
await copyTrader.follow(address, {
  trailingTakeProfit: true,
  trailingPct: 5,  // Trail by 5%
});

Daily Limits

typescript
const copyTrader = createCopyTradingService({
  limits: {
    maxDailyLoss: 500,      // Stop after $500 loss
    maxDailyTrades: 20,     // Max 20 trades
    maxTotalExposure: 5000, // Max $5k total exposure
  },
});

Best Practices

  1. Start with small sizes - Test with 10-25% proportional sizing
  2. Use delays - 15-30 second delays reduce front-running risk
  3. Set stop-losses - Always use 10-15% stop-loss
  4. Diversify - Follow 3-5 wallets, not just one
  5. Monitor regularly - Check performance daily
  6. Filter markets - Focus on categories you understand

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Copy Trading AI skill do?

Automatically copy trades from successful wallets on Polymarket and crypto

Why use Copy Trading on TypingMind?

Because you install it once and use it with any model. Copy Trading is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Copy Trading in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/alsk1992/CloddsBot/tree/main/src/skills/bundled/copy-trading. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Copy Trading?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Copy Trading?

As many as you like. As long as a model supports skills, you can use Copy Trading with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Copy Trading AI skill free?

Yes. It is published on GitHub by alsk1992 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇