# Introduction

Copy Trading lets your bot automatically mirror the trades of another wallet in real time. When a target wallet buys or sells a token, your bot will do the same based on your personal settings.

This feature is perfect for following smart traders, influencers, or high-performing wallets without manually placing trades yourself.

***

## **How Copy Trading Works**

Copy Trading continuously monitors the wallets you choose. The system:

1. Detects when a target wallet buys or sells
2. Identifies the token and which DEX the trade happened on
3. Calculates how much *you* should buy or sell
4. Executes your transaction automatically
5. Tracks your positions for rebuy logic and sells

Latency is extremely low — usually **50–200ms** from when the target wallet trades to when your bot reacts.

***

**Target Wallets**

You can monitor multiple wallets at the same time.\
When you add wallets through the bot or backend, the system starts:

* Listening to their trades live
* Matching any buys or sells
* Applying your personalized trade settings

You can add or remove wallets anytime.

***

## **Copy Trading Logic**

### **When the Target Buys**

Your bot will:

1. Detect the buy
2. Identify the DEX (PumpFun BC, PumpFun AMM, Jupiter, etc.)
3. Check if this is a first-time buy or a rebuy
4. Calculate your trade size
   * First buy uses your **trade\_size\_sol**
   * Rebuys use **rebuy\_percentage**
5. Execute your buy using your slippage settings

***

### **When the Target Sells**

Your bot will:

1. Detect the sell
2. Estimate how much of the target’s position was sold
3. Check your current token balance
4. Sell the equivalent percentage

## **Rebuys Explained**

A **rebuy** happens when a target wallet buys a token they previously bought.

Your bot can treat rebuys differently from first buys.

### **Rebuy System Features**

* Tracks your first buy as the “original trade size”
* Calculates rebuy size using your **rebuy\_percentage**
* Continues tracking as long as you still hold the token
* Resets after you fully sell the token

#### Why the system resets after a full sell?

Because you’ve completely exited the position — future buys should start fresh.

***

## **Rebuy Settings**

### **Allow Rebuys**

If enabled:

* You copy every additional buy after the first one.

If disabled:

* You only copy the first buy.
* All rebuys are skipped.

### **Rebuy Percentage**

Controls how big your rebuys are compared to your original buy.

***

## **Supported DEXes**

#### **PumpFun Bonding Curve**

* For tokens still on the bonding curve
* Bot auto-detects the creator

#### **PumpFun AMM**

* For PumpFun tokens that migrated to Raydium
* Bot auto-detects the pool

#### **Jupiter (Multi-DEX Router)**

* Used for all other DEXes
* Automatically finds the best route and price

***

Submission parameters (e.g., MEV protection, RPC selection, tips) also apply, but are covered in the Submission Config section.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rust-rocket.gitbook.io/rust-rocket/copy-trader/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
