> For the complete documentation index, see [llms.txt](https://docs.jaawle.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jaawle.xyz/product/limit-orders.md).

# Limit orders

A limit order opens a position once the market reaches the price you name, and never at a worse price. It rests on-chain and is executed by the keeper, so it fills while your browser is closed.

## Placing an order

1. Switch the ticket to **Limit** and enter the limit price. A buy must sit below the current ask, a sell above the current bid; an order that would fill immediately is a market order, and the ticket offers those.
2. Enter the size and the leverage as for a market order.
3. Confirm in your wallet, or let one-click sign for you. Placing and cancelling are one-click actions like the others. See [One-click trading](/product/one-click-trading.md).

The margin for the position is taken from your USDC when you place the order and held in escrow until the order fills, is cancelled, or expires. The **Orders** tab lists every resting order with its price, the mark, the margin held and when it was placed.

Take-profit and stop-loss go on the position, not on the order: once the limit fills, set them from the positions table or the chart. See [Take-profit and stop-loss](/product/take-profit-stop-loss.md).

## Which price counts

A buy fills when the ask falls to the limit, a sell when the bid rises to it, the same prices a market order would pay. The bid and the ask are the oracle mid minus and plus Pyth's confidence band.

The fill is capped at your limit: the position opens at the market's ask or bid at that moment, which is at or better than the price you asked for.

## Cancelling and moving

Cancel from the Orders tab; the margin returns to your wallet in the same transaction. Dragging the order line on the chart cancels the order and places a new one at the new price with the same notional.

An order expires 30 days after it was placed. Past that anyone may expire it, and the margin goes back to your wallet.

## Execution

The keeper compares every resting order with each price it publishes on-chain and executes the ones that were reached; a slower safety pass reconciles with the book and returns the margin of expired orders. Anyone may execute a reached order after a short priority window that starts when someone flags it, so a keeper outage does not strand an order.

Limit orders on stock markets, like every open, only execute while the session is open. An order reached in the evening fills at the first print of the next session if the price is still there.

The fill appears in History as a **limit fill**, with a link to the transaction.


---

# 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.jaawle.xyz/product/limit-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.
