# Trading

The core swap trading feature lets you buy and sell any Solana token directly through Telegram. All trades execute through Jupiter, which aggregates liquidity from multiple decentralized exchanges to find you the best available price.

***

## How to Buy a Token

This section details how you can execute a swap trade — buying a token with SOL or selling a token for SOL.

### Step-by-Step Process

1. **Send `/trade`** — The bot opens the trading panel and waits for your input.
2. **Paste a token address or URL** — You can paste:
   * A raw Solana token address (e.g., `7xKXq2JcU7W9W6F8Yj4cK2ZvN9YfXk3P6mN4vQqR5sT`)
   * A pump.fun link: `pump.fun/coin/7xKXq2JcU7W9W6F8Yj4cK2ZvN9YfXk3P6mN4vQqR5sT`
   * A DexScreener link: `dexscreener.com/solana/7xKXq2JcU7W9W6F8Yj4cK2ZvN9YfXk3P6mN4vQqR5sT`
   * A Jupiter swap link: `jup.ag/swap/SOL-7xKXq2JcU7W9W6F8Yj4cK2ZvN9YfXk3P6mN4vQqR5sT`
3. **ARCHONE fetches token info** — While loading, the bot shows "Looking up token...". It retrieves:
   * Token symbol and name
   * Current market price
   * Safety scan results (see Safety Scan below)
4. **Set your buy amount** — Choose from preset buttons or enter a custom SOL amount:
   * Presets: 0.1, 0.25, 0.5, 1.0 SOL (configurable in `/presets`)
   * Custom: Tap "Custom" and enter any amount (minimum 0.01 SOL)
5. **Configure TP/SL (optional)** — Set Take Profit and Stop Loss targets:
   * **Take Profit**: Sell a percentage of your tokens when the price reaches X%
   * **Stop Loss**: Sell all tokens if the price drops below X%
   * **Trailing Stop**: Follow the price up and trigger a sell when it drops X% from its peak
6. **Review and confirm** — The bot shows a summary of your order:
   * Token being bought
   * Amount in SOL
   * Estimated output (token amount you'll receive)
   * Slippage tolerance
   * TP/SL settings (if any)
7. **Tap Confirm** — The trade executes immediately.
8. **Result** — The bot shows:
   * **Success**: Transaction hash, tokens received, position created
   * **Failure**: Error reason (insufficient balance, slippage exceeded, token inactive, etc.)

***

## How to Sell a Token

Selling works similarly to buying, but in reverse.

1. Send `/portfolio` to see your open positions.
2. Tap on the position you want to sell.
3. Tap **Sell**.
4. Choose to sell **100%** of your tokens or **Custom** amount.
5. Set TP/SL if desired (optional).
6. Confirm.
7. The bot executes the sell and credits your wallet with SOL.

***

## Safety Scan

This section details how ARCHONE evaluates token risk before you trade. Every token you look up is scanned through RugCheck to detect potential scams, honeypots, and risky token configurations.

### What Gets Checked

| Check                | What It Looks For                               | Why It Matters                      |
| -------------------- | ----------------------------------------------- | ----------------------------------- |
| **RugCheck Score**   | Overall risk score from 0–10,000                | High scores indicate higher risk    |
| **Mint Authority**   | Whether the token creator can mint new tokens   | Can dilute your holdings            |
| **Freeze Authority** | Whether tokens can be frozen                    | Can lock your funds                 |
| **Top Holder %**     | How much of the supply the largest wallets hold | High concentration = potential dump |
| **LP Locks**         | Whether liquidity is locked                     | Unlocked LP = higher exit scam risk |
| **Trading Paused**   | Whether trading has been halted                 | Can't sell if paused                |

### Safety Tiers

| Tier        | Meaning                  | Action                             |
| ----------- | ------------------------ | ---------------------------------- |
| **SAFE**    | Token passed all checks  | Safe to trade                      |
| **CAUTION** | Some red flags detected  | Trade with care, use small amounts |
| **DANGER**  | Significant risk factors | Do not trade                       |
| **UNKNOWN** | Could not complete scan  | Proceed with extreme caution       |

### Interpreting Results

**Score Display:**

* 0–1,000: Low risk (green)
* 1,000–3,000: Medium risk (yellow)
* 3,000–5,000: High risk (orange)
* 5,000+: Very high risk (red)

**Flags:** Each flag has a severity level. Common flags include:

* `Mint Authority Active` — Creator can create more tokens
* `Freeze Authority Active` — Creator can freeze your tokens
* `High Holder Concentration` — Top holders own >10% of supply
* `Unverified Contract` — Code has not been audited

### Recommendations

* **Never trade DANGER tokens.** The risk of losing 100% of your funds is very high.
* **Exercise caution with CAUTION tokens.** Only trade amounts you can afford to lose.
* **Verify independently.** Safety scans are one tool — always do your own research.

***

## Slippage

Slippage is the difference between the expected price and the actual execution price. Higher volatility tokens need higher slippage to ensure the trade succeeds.

### Default Slippage

Set your default in `/settings`. The default is 1% (100 basis points).

### Per-Trade Override

When placing a trade, tap **Slippage** to adjust for that specific trade:

* **0.5% (50 bps)** — Safe for stable, liquid tokens
* **1% (100 bps)** — Default, works for most tokens
* **3% (300 bps)** — For volatile or low-liquidity tokens
* **5%+ (500+ bps)** — Only for highly volatile new tokens with minimal liquidity

### What Happens on Slippage Exceed

If the price moves more than your slippage tolerance before execution:

* The trade is rejected
* No tokens are exchanged
* You receive an error: "Price impact exceeded"

To proceed, retry with a higher slippage setting.

***

## Priority Fees

Priority fees (also called "compute unit prices") are extra fees paid to validators to include your transaction in the next block. Higher fees = faster execution = better chance of getting in before a price moves.

### Fee Tiers

| Level      | When to Use                                                                 |
| ---------- | --------------------------------------------------------------------------- |
| **Low**    | You're not in a hurry. Saves fees on larger, less time-sensitive trades.    |
| **Medium** | Default. Good for most trades. Balances speed and cost.                     |
| **High**   | Fast-moving markets. Sniper entries. When you're competing for a new token. |
| **Turbo**  | Maximum priority. Use sparingly — this significantly increases fees.        |

### MEV Protection

ARCHONE integrates with Jito for MEV protection on high-priority trades. Jito bundles your transaction with others, reducing the chance of front-running. Enable MEV protection in `/settings`.

> **Note:** MEV protection adds a small tip to your transaction (set in settings). Enable it for buys of new or volatile tokens.

***

## Trade Statuses

Every trade goes through several statuses:

| Status              | Meaning                                               |
| ------------------- | ----------------------------------------------------- |
| **CREATED**         | Trade initiated, waiting to process                   |
| **SAFETY\_CHECKED** | Passed safety scan                                    |
| **RISK\_CHECKED**   | Passed risk validations (balance, limits)             |
| **QUOTED**          | Got price quote from Jupiter                          |
| **SIGNED**          | Transaction signed with your wallet key               |
| **BROADCAST**       | Sent to Solana network                                |
| **CONFIRMED**       | Included in blockchain — trade complete               |
| **FAILED**          | Trade did not complete. Error code and message shown. |

If a trade fails, the bot shows the error code:

* `INSUFFICIENT_SOL` — Not enough SOL for trade + fees
* `SLIPPAGE_EXCEEDED` — Price moved too much
* `NO_ROUTE` — No trading route found for this token
* `LOW_LIQUIDITY` — Token has less than $5,000 liquidity
* `DAILY_LOSS_LIMIT` — You've hit your daily loss limit
* `TRADING_DISABLED` — Bot is locked with `/lock`

***

## Auto-Buy

Enable auto-buy in `/settings` to automatically purchase a token when you paste its address. This skips the confirmation step for faster execution.

**How it works:**

1. Paste a token address
2. ARCHONE checks safety
3. If not DANGER, it auto-buy with your default amount and settings
4. Shows you the result

This is useful for sniper-style entries where speed matters.


---

# 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://docs.archone.trade/core-features/trading.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.
