# Using Grid Bots on Web

### How to Set Up a Grid Bot？

#### Step 1: Create a Grid Bot

1. Log in to your exchange account.
2. Click on your **account avatar**.
3. Click the **"+" icon** next to Bot Accounts.

<div align="left"><figure><img src="/files/5Y899LPlGhWuGbsPRXdm" alt="" width="563"><figcaption></figcaption></figure></div>

4. Enter a name for your bot (e.g., "SOL Grid Strategy").
5. Click **Add subaccount**.

<div align="left"><figure><img src="/files/qsY8a6FRtc6JzKB7bbS3" alt="" width="563"><figcaption></figcaption></figure></div>

***

#### Step 2: Fund Your Bot

Transfer funds to your bot subaccount using one of these methods:

* [Transfer funds from your main account](/exchange/deposit-and-withdraw/crypto/deposit/how-to-deposit.md#deposit-via-subaccounts)&#x20;
* [Deposit from an external wallet into the subaccount.](/exchange/deposit-and-withdraw/crypto/deposit/how-to-deposit.md)

***

#### Step 3: Select the Trading Pair

1. Enter your bot subaccount.
2. Navigate to the **Bots** section.
3. Choose **Futures Trading**.
4. Select your target trading pair (e.g., SOL-PERP).

<div align="left"><figure><img src="/files/kzuD6sQL2hTcvHujbKkp" alt="" width="563"><figcaption></figcaption></figure></div>

***

#### Step 4: Configure Parameters

1. Set the **Price Lower Limit** — The lowest price in your grid range.
2. Set the **Price Upper Limit** — The highest price in your grid range.
3. Enter the **Number of Grids** — How many price levels to create within the range.
4. Enter the **Total Grid Value** — The capital allocated to this grid.
5. Click **Create Grid** — The bot will begin running automatically.

> **Note:** More grids = more frequent trades with smaller price differences between levels. Fewer grids = less frequent trades with larger price differences between levels.

<div align="left"><figure><img src="/files/vltZvlSekMIW8xNTbMEC" alt="" width="563"><figcaption></figcaption></figure></div>

***

### Take-Profit and Stop-Loss Settings

> ⚠️ **Important:** Take-profit and stop-loss apply to the **entire bot subaccount**, not to individual grids.

#### Stop-Loss

Defines a drawdown threshold that will stop the bot when reached.

**How it works:**

* The bot tracks the starting equity of your subaccount from the moment the strategy is activated.
* If equity falls X% below the starting equity, the bot stops automatically.

**Example:** Starting equity is $1,500. With a 20% stop-loss setting, the bot stops if equity drops to $1,200.

<div align="left"><figure><img src="/files/bl0atKPqq56gVOcM1GY1" alt="" width="563"><figcaption></figcaption></figure></div>

#### Take-Profit

Defines an equity threshold that will pause the bot when reached.

**How it works:**

* The bot tracks the starting equity of your subaccount from the moment the strategy is activated.
* If equity rises X% above the starting equity, the bot pauses automatically.

**Example:** Starting equity was $1,000. With a 20% take-profit setting, the bot pauses when equity reaches $1,200.

<div align="left"><figure><img src="/files/EaxnvqeC31IqJCd35ryD" alt="" width="563"><figcaption></figcaption></figure></div>

***

#### Auto-Close Positions

When setting up take-profit or stop-loss, you can choose whether to **automatically close all positions** when either threshold is triggered.

<div align="left"><figure><img src="/files/mTFDh6eO8PR1secypufR" alt="" width="563"><figcaption></figcaption></figure></div>

***

### Bot Management

#### Understanding Bot ON/OFF States

The ON/OFF toggle controls whether the bot is actively managing trades for the entire subaccount.

| State | What Happens                                                                                                                                                                    |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ON    | <p>The bot actively executes trades according to your grid configurations.<br><strong>Important:</strong> You cannot manually trade in this subaccount while the bot is ON.</p> |
| OFF   | The bot stops executing new orders. Existing pending orders remain but can be cancelled manually. You can trade manually in the subaccount.                                     |

<div align="left"><figure><img src="/files/D4ywpIeQbBC2fNLyPqxF" alt="" width="563"><figcaption></figcaption></figure></div>

> ⚠️ **Key Point:** If the bot is ON but you have no active grids, no trading will occur. The bot needs at least one grid to execute trades.

> ⚠️ **Manual Trading Restriction:** You cannot manually place orders in a bot subaccount while the bot is ON. Turn the bot OFF first if you need to intervene manually.

***

#### Adjusting Grid Settings

To modify an active grid:

1. Go to the **Grids** tab.
2. Select **Edit**.
3. Adjust parameters such as:
   * Expanding or narrowing the price range
   * Pausing or restarting the grid

<div align="left"><figure><img src="/files/rfY2kqr5pXxLJuS2dZJ0" alt="" width="563"><figcaption></figcaption></figure></div>

***

#### Deleting a Grid

1. Go to the **Grids** tab.
2. Select **Delete**.
3. Choose whether to close all remaining positions automatically.&#x20;

<div align="left"><figure><img src="/files/XCKLkUrdSJUuIWRkl52o" alt="" width="563"><figcaption></figcaption></figure></div>


---

# 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/using-grid-bots-on-web.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.
