> For the complete documentation index, see [llms.txt](https://docs.lexer.markets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lexer.markets/innovations-and-mechanism/guaranteed-execution.md).

# Guaranteed Execution

## Precise execution on opening & closing positions

Sometimes the market can move a few percentages in seconds due to volatility.&#x20;

In other typical perpetual dexes, when stop losses are hit in these volatile conditions, traders might suffer extra losses due to the time needed to execute the trade. And during this time, the price might continue to drop further before the trade is executed. Additionally, by the nature of oracle-based trading platforms, trades might not be executed if the price moves in and out of the limit order too quickly before they are executed.

Lexer tackles this problem with help from our innovative oracle structure. When prices hit the limit order, **we can guarantee to execute the trade at the exact price the trader sets**, no matter how long it takes to execute the trade on chain.


---

# 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.lexer.markets/innovations-and-mechanism/guaranteed-execution.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.
