# Trading Bots

### What is a Grid Bot?

A grid bot is an automated trading strategy that places buy and sell orders at predefined price intervals within a set range.

It captures profits from price fluctuations without requiring you to predict market direction. The strategy continuously executes “buy low, sell high” across multiple price levels.

***

### How Grid Bots Work

The bot splits your selected price range into equal intervals and places orders at each level:

* Orders above the current price → **Sell orders**
* Orders below the current price → **Buy orders**

Example:

```
$110 ─ SELL
$108 ─ SELL
$106 ─ SELL
$104 ─ SELL
$102 ─ SELL
──────── Current price: $100 ────────
 $98 ─ BUY
 $96 ─ BUY
 $94 ─ BUY
 $92 ─ BUY
 $90 ─ BUY
```

As the price moves within the range:

* Orders are filled
* The bot captures the spread as profit

Example:

* Grid spacing = $2
* Buy at $98 → Sell at $100 → Profit = $2 per cycle

***

### When Grid Bots Work Best

| Condition                        | Grid Bot Performance                         |
| -------------------------------- | -------------------------------------------- |
| **Sideways/ranging market**      | ✅ Ideal — frequent fills, steady profits     |
| **High volatility within range** | ✅ Good — more trading opportunities          |
| **Strong trending market**       | ⚠️ Poor — price breaks out of range          |
| **Low volatility**               | ⚠️ Poor — few orders fill, capital sits idle |

> **Key insight:** Grid bots profit from prices bouncing within a range, not from predicting direction. They work best in choppy, sideways markets.

***

### How the System is Structured

**Bot Structure**

Grid bots run inside a dedicated subaccount:

```
 User Account
  └─► Subaccount (dedicated to grid trading)
        └─► Automation / Bot (one per subaccount)
              ├─► Grid 1: SOL_USDC (own range, levels, allocation)
              ├─► Grid 2: ETH_USDC (own range, levels, allocation)
              └─► Grid 3: BTC_USDC (own range, levels, allocation)
```

**Key Rules**

* **One subaccount = one bot**\
  Each subaccount supports only **one active automation**.
* **One bot can manage multiple symbols**\
  A single bot can run grids across different symbols (e.g., SOL, ETH, BTC).
* **SL/TP controls**\
  Each grid can have its own direction(Perpetuals Only) and **symbol-level** SL/TP settings.
* **Subaccount isolation**\
  Grid trading is isolated from manual trading in other subaccounts.
* **Independent automation requires separate subaccounts**\
  To run fully independent bots (with separate leverage settings), use different subaccounts.

**Limits**

* Grid levels: **4–200**

***

### Risk Warnings

#### Market Risks

* **Price Breaks Out of Range** — If price moves outside the grid range and stays there, one side fills and leaves you holding a position with unrealised PnL.\
  **Mitigation:** Use stop loss, enable trailing if available, and set realistic ranges. Lower Stop and Upper Stop can auto-stop the grid when price exits the range.
* **Low Volatility** — Few or no fills occur, resulting in little or no profit while capital remains idle.\
  **Mitigation:** Match your grid range to expected market volatility.
* **Market Gaps** — Sudden price jumps (e.g., news or maintenance) may cause orders to fill at unfavourable prices, leading to immediate unrealised losses.\
  **Mitigation:** Use stop loss, avoid illiquid markets, and monitor major events.
* **Liquidation Risk (Perpetual Grids)** — Leverage amplifies losses. If the market moves sharply against an open position, the subaccount may be liquidated, closing positions at unfavourable prices.\
  **Mitigation:** Use conservative leverage, set stop loss, and monitor margin usage.
* **Correlated Symbols** — Running multiple grids on correlated assets (e.g., SOL, ETH, BTC) can lead to simultaneous drawdowns.

#### **Operational Risks**

* **Transferring Assets During a Run** —
  * For **perpetual grids**, removing collateral from the subaccount reduces equity and lowers your margin ratio, which can trigger exchange **liquidation** of open positions. This is independent of the bot's symbol-level SL/TP.
  * For **spot grids**, removing base asset reduces the coverage available to fill sell orders, which can leave parts of the grid unable to place orders until the deficit is resolved.

> ⚠️ **Disclaimer:** Trading bots involve significant risk. You may lose some or all of your invested capital. Past performance does not guarantee future results. This documentation explains how the feature works and does not constitute financial advice or a recommendation to use this product.


---

# 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://support.backpack.exchange/exchange/trading/trading-bots.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.
