> For the complete documentation index, see [llms.txt](https://logx-1.gitbook.io/logx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://logx-1.gitbook.io/logx-docs/logx-perp-dex/technical-overview/market-order-execution.md).

# Market Order Execution

Execution of market orders happens in the following manner:

1. Users call the relevant functions mentioned above and create an increase/decrease position request.
2. The keeper bot listens to position requests being placed on the contract and executes them.
3. Keeper calls PriceFeed.setPricesAndExecute function which first updates the price on the pricefeed contract and executes market order in a single transaction. This is done to avoid front-running issues while executing market orders.
