# Market Order

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

#### Market Orders

Execute immediately at best available price. Routing algorithm splits between order book and AMM based on market conditions.

**Parameters:**

* `instrument`: Trading pair (e.g., BTC-USD)
* `side`: LONG or SHORT
* `size`: Position size in base asset
* `stopPrice`: Optional maximum acceptable price

**Execution Flow:**

1. Validation of parameters and margin
2. Oracle price aggregation
3. Hybrid Order Router analysis
4. Venue split determination
5. Atomic execution
6. Position update with weighted average entry


---

# 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.drake.exchange/trading/order-types/market-order.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.
