> For the complete documentation index, see [llms.txt](https://docs.origami.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.origami.tech/bots/spot-bot.md).

# Create a Spot grid bot

Create a Spot custom bot — bot settings, optional preset, first grid with execute\_price, execute\_volume and order counts, then Run.

A Spot custom bot trades one spot pair on one account. Its behaviour is defined by **grids** — sets of arguments (numbers or formulas) that are recalculated on every cycle to place buy and sell orders. This page walks through the whole flow: bot settings, an optional preset, the first grid and the start.

## Before you start

* A spot account connected in [Accounts](/accounts.md) with a balance in the pair you want to trade.
* Ten minutes. Starting from a preset is faster — see [Launch your first bot from a preset](/getting-started/first-bot.md).

## Step 1 — Bot settings

1. Open **Bots** and click **Add Bot**, then **Select** under **Custom Bots**.
2. Leave **Bot Type** on **Spot**.
3. **Bot Name** — 1–16 characters: letters, numbers, spaces, `-`, `_` and `|`.
4. **Account** — pick the account. The list shows `Exchange | Account name` and includes only accounts whose exchange supports spot trading. If it is empty, click **Add Account**.
5. **Pair** — search and pick the pair, for example `BTC-USDT`. The list comes from the exchange of the selected account.
6. Click **Continue**.

![Add Bot form for a Spot bot: Bot Type, Bot Name, Account, Pair](https://602593284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDjboTEEPFNxFhKJ6msZi%2Fuploads%2F3T7DKV0m4IPupDoAV1B0%2Fbots-spot-bot-01.png?alt=media)

## Step 2 — Preset (optional)

The **Select preset** step offers ready-made grid sets. Filter with **Presets By**: **All**, **Origami** (public presets) or **Me** (your own). Pick one and click **Import**, or **Skip** to start with an empty grid.

If the preset has inputs, the **Fill Inputs** step asks for their values — for example a spread or an order size — and writes them into every grid of the preset. See [Presets](/bots/presets.md).

## Step 3 — The first grid

You land on the bot's grids page (`/bots/spot/<id>`). A new bot with no preset opens **New Grid 1** with four base arguments:

| Argument            | Default    | Meaning                                                             |
| ------------------- | ---------- | ------------------------------------------------------------------- |
| `execute_price`     | `ticker()` | Price of the first order. `ticker()` is the last price of the pair. |
| `execute_volume`    | `100`      | Order size in the base asset.                                       |
| `buy_orders_count`  | `1`        | How many buy orders to keep below the price.                        |
| `sell_orders_count` | `0`        | How many sell orders to keep above the price.                       |

The names of these four cannot be changed; everything else about the grid can.

1. Set `execute_volume` to a size the exchange accepts. For BTC that is something like `0.001`, not `100`.
2. Set `buy_orders_count` and `sell_orders_count`. `1` and `1` gives one order on each side of the price.
3. Click **Add Argument** to define your own values or formulas — for example `spread` = `0.002` and then `execute_price` = `ticker() * (1 - spread)`. Argument names start with a letter and contain letters, digits and `_`; a grid holds 1–20 arguments.
4. Click the expand icon next to a value to edit it in the code editor with highlighting and autocomplete of grid functions.
5. Optional: tick **Post Only** to place maker-only orders.
6. Click **Save**.
7. Click **Simulate** and then **Refresh** to see the orders the grid would place right now. **Refresh** is enabled only for a saved grid, which is why **Save** comes first. See [Grid simulation](/bots/simulation.md).

![Grids page of a spot bot: grid tabs, toolbar, Post Only flag and the Arguments list](https://602593284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDjboTEEPFNxFhKJ6msZi%2Fuploads%2FrUtKK1wEIKXG5Ztv7AdA%2Fbots-spot-bot-02.png?alt=media)

To add more grids click **+** in the tab bar. Each grid runs independently; **Only Active** hides the disabled ones. See [Create a grid](/grids/create-grid.md) for the details of arguments, and [Recipes](/grids/recipes.md) for worked examples.

## Step 4 — Run

Click **Run** in the header. The button turns into **Stop**, the bot shows **Active** on the Bots page and its orders appear in [Active Orders](/terminal/active-orders-and-history.md) with the bot's name as the strategy.

**Run** is available only when the bot has at least one saved grid.

{% hint style="warning" %}
A running bot places real orders with real funds. Start with a small `execute_volume`, check the first orders in **Active Orders**, then scale up.
{% endhint %}

## Edit a running bot

* Arguments can be edited while the bot runs; changes apply on the next cycle after **Save**.
* Bot settings (name, account, pair) are edited with **Back** in the bot header or from **Edit Bot** on the Bots page. Changing the account clears the pair. Stop the bot before changing the account or pair.
* **Copy Bot** / **Paste Bot** in the header copies all grids to another bot; **Copy Grid** / **Paste Grid** does the same for one grid. Paste appends, it does not replace.

## Troubleshooting

| Symptom                                 | Cause                                                                | Fix                                                                  |
| --------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
| **Run** is disabled                     | No saved grid                                                        | Add a grid and click **Save**                                        |
| Bot is **Active** but places nothing    | Grid evaluates to zero orders or an argument is empty                | Open **Simulate** → **Refresh**; check **Error Log**                 |
| Toast **Grid N has empty key or value** | An argument row has no name or no value                              | Fill it in or remove the row                                         |
| Orders rejected in **Error Log**        | Size below exchange minimum, insufficient balance, price out of band | Adjust `execute_volume` / `execute_price`; check the account balance |

## Related

* [Futures grid bot](/bots/futures-bot.md)
* [What is a grid](/grids/what-is-a-grid.md) · [How a grid executes](/grids/how-a-grid-executes.md)
* [Grid language reference](/reference/grid-language.md)
* [Bot lifecycle](/bots/lifecycle.md)
