> For the complete documentation index, see [llms.txt](https://docs.kwenta.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kwenta.io/using-kwenta/perpetual-futures/smart-margin/trading-on-kwenta/conditional-orders.md).

# Conditional Orders

Leveraging Gelatos keeper system, Kwenta can automate advanced orders through Smart Margin. The first two products to come out of this will be limit and stop-market orders. [**Gelato Network**](http://gelato.network/) is a decentralized network of keepers used by web3 apps to automate smart contract executions on all major public EVM-compatible blockchains, including Optimism. Using Gelato gives Kwenta peace of mind when it comes to automating and relaying transactions with confidence.

Keepers can do things like execute limit orders, liquidate an under-collateralized position, on-chain, and autonomously. Automated keeper are set in place to automatically execute advanced orders when their conditions are met. Due to this development, there is no manual intervention needed from traders on Kwenta to execute orders on Kwenta.

{% hint style="success" %}
Using advanced orders on Kwenta will automatically deposit **0.01 ETH** into your margin accounts Keeper. This ETH will be used to pay the blockchain transaction cost when Gelato submits your order.
{% endhint %}

<figure><img src="/files/DbFdtdymGIrRFtc5aHLC" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Anytime your account ETH balance is less than 0.01 ETH, the next advanced order you place will deposit enough ETH to restore it back to the 0.01 ETH (if available). At any time, traders can withdraw this ETH back to their wallet by selecting the `up arrow` and completing the withdrawal transaction.
{% endhint %}

### Why does Kwenta need to deposit 0.01 ETH?

Transaction costs on Optimism generally range between 0.05$ and 0.50$, depending on the type of transaction and current gas price conditions on L1.  At the current value of about 13$ for 0.01 ETH (as of October 2022), the deposit should allow a trader to execute approx. twenty advanced orders with ease.&#x20;

{% hint style="info" %}
To ensure that your advanced order transactions are being executed by the Keeper even under extremely volatile market conditions, a buffer of 0.01 ETH has been implemented to ensure timely execution and avoid failed advanced order transactions.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.kwenta.io/using-kwenta/perpetual-futures/smart-margin/trading-on-kwenta/conditional-orders.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
