# Auto Buy

{% hint style="warning" %}
Activating <kbd>**Auto Buy**</kbd> will automatically execute a purchase whenever you send a token address or pump.fun link to Ocean.
{% endhint %}

## Video Tutorial 👇

(Screenrecord or link to YouTube video)

***

To activate **Auto Buy**, navigate to the **Settings** tab in the main menu and select <kbd>**Auto Buy**</kbd>.

You'll then see a menu like this:

(Screenshot)

* Click <kbd>**Add Rule**</kbd>&#x20;
  * (Screenshot)
* Enter the **minimum market cap** value in the correct format (e.g., 5k = 5000 Market Cap).
* Enter the **maximum market cap** value, also in the correct format (e.g., 5k = 5000 Market Cap).
* Set your **preset buy amount**, which will be used for each transaction when Auto Buy is enabled.
* (Optional) Configure a **SL & TP**. For more details, refer to the [**SL & TP**](/settings/tp-and-sl.md) section.

***

## More Info :point\_down:

| Button          | What does it do?                                                                                          | Bot´s Response                                                                                                                                                                                                                                                                                                                                     |
| --------------- | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🔴🟢 Active     | 🔴: Disabled 🟢: Enabled                                                                                  | 🟢 / 🔴                                                                                                                                                                                                                                                                                                                                            |
| 🆕 Add Rule     | Set up rules for Auto Buy to ensure transactions are only executed when the specified conditions are met. | <p><code>Please enter the minimum market cap value. You can enter values like 5k, 100k, 1m etc. - Example: 5k.</code> </p><p> </p><p><code>Please enter the maximum market cap value. You can enter values like 5k, 100k, 1m etc. - Example: 5k.</code></p><p> </p><p><code>Please enter the buy amount value. (in SOL) - Example: 0.01</code></p> |
| 💸 SL & TP      | [SL & TP](/settings/tp-and-sl.md)                                                                         | [SL & TP](/settings/tp-and-sl.md)                                                                                                                                                                                                                                                                                                                  |
| 🗑️ Delete Rule | This will delete one of the rules you have entered into the bot.                                          |                                                                                                                                                                                                                                                                                                                                                    |

<details>

<summary>What is the Minimum Market Cap Value?</summary>

When set, **Ocean** will only proceed with a buy if the token's market cap meets or exceeds the specified minimum threshold.

* If the market cap is **below** the set value, the standard buy screen will be displayed.
* If the market cap is **above** the set value, the buy will be executed automatically.

</details>

<details>

<summary>What is the Maximum Market Cap Value?</summary>

When set, **Ocean** will only initiate a buy if the token's market cap is **at or below** the specified maximum threshold.

* If the market cap is **above** the set value, the standard buy screen will be displayed.
* If the market cap is **below** the set value, the buy will be executed automatically.

</details>


---

# 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.oceanbots.ai/extension-features/buying/auto-buy.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.
