# Orderbook

The orderbook feature to enter a trade allows you to consider current liquidity in the orderbook. It is designed to avoid slippage and optimize the execution of large market orders.

The bot will execute a market order considering a maximum slippage. However, you may not fill the full initial position desired.&#x20;

1 tick is equivalent to 0.5$. \
If Market price is 20 000$, 1 tick on the buy side is 19 999,5$, 1 tick on the sell side is 20 000,5$.

*Ex: \[Constant entry size: 10M $] \[A size of 100% of the first 4 orderbook ticks]*

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

*The bot triggers a market order long position and wants to open a maximum size of 10M$ but with a maximum slippage of 2$ which is equivalent to 4 ticks. However, Market price is 18 870$ and liquidity on the sell side up to 18 872$ (18 870$ market price + 2$ max slippage) is 1 691 907$.* \
\
*The bot will then execute an equivalent of a market order (limit buy price above market price) of     1 691 907$ at 18 872$ to immediatly fill a long position with a maximum slippage of 2$.*

*With a normal market buy order of 10M$, the slippage would be more than 20$ and the strategy may no longer be worth it.*


---

# 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.runbot.io/risk-management-boxes/position-size/orderbook.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.
