# Automation

Adding automated orders like stop losses (SL) and take profits (TP) is possible via the [Advanced](/app/simplified.md) interface, but not the [Simplified](/app/simplified.md) one; however, any position open under the Simplified page is also visible and editable under the Advanced page. Adding a SL/TP order incurs [trading fees](#fees) as indicated in the previous section. Traders also pay a reward to cover gas costs for keeper bots. This reward is now set to 2 times the gas cost, but can vary from 1 to 10 times. The currency this rewards is charged with depends on the margin posted by the trader:

* If the trader posts margin in the base, then it’s taken from the margin.
* If the trader posts margin in the quote, then it’s taken from the margin by computing it via oracle prices.

When a SL/TP order is triggered and your position is closed, you receive cashflow in the quote currency.

SL/TP orders are triggered when the oracle price is at +/- 0.01% away from the trigger price on correlated pairs and at +/- 0.05% on non-correlated assets. There is a 20% slippage tolerance to fill an order. For instance, if you set a SL at 1000 on a long position, Contango will do its best to fill it at 1000 but it could go as low as 800. If it less than that, the SL will not be executed and will be cancelled. \
\
Currently, keeper bots are run by the Contango team and execution is not guaranteed. The team plans to open source this in the future. Several reasons could lead to an order not being executed:

* The price on chain moves too fast and transactions cannot be submitted.
* Market conditions result in excessive slippage, preventing SL/PT execution.
* Lack of flash loan liquidity.
* Bot is down or facing issues.

{% hint style="warning" %} <mark style="color:orange;">**Before trading**</mark> → always make sure to have a stop loss in place to protect yourself from unexpected liquidations, unless you plan to monitor your position frequently.
{% endhint %}


---

# 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.contango.xyz/basics/key-features/automation.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.
