> For the complete documentation index, see [llms.txt](https://docs.jayx.com/jayx-docs-n8rfmgwto77q5ila/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jayx.com/jayx-docs-n8rfmgwto77q5ila/solutions/dapp/exchange-nodes/order-book.md).

# Order Book

The order book is primarily composed of orders submitted by users, such as buy orders or sell orders. Additionally, based on users' intent or the functionalities offered by the trading platform, these can be divided into market orders, limit orders, and stop orders. These orders can also be referred to as conditional orders, which are matched by the matching engine once the conditions are met. For example, the condition for triggering a market order occurs when the user's order price aligns with the current market price, at which point the order can be executed. These conditions can be programmed and realized within the operations of smart contracts.

Since the assets on JayX are still held by the users, they must sign their orders to ensure the orders are authorized by them. The off-chain transaction pool will verify the correctness of the orders to prevent any illegal orders from entering the system. Legitimate orders will then form an order book in the trading pool. Since JayX is an open network, any valid orders can be included. Similarly, any node that joins according to the protocol will be able to participate in facilitating and managing the order book in the trading pool, enabling anyone to execute orders and ensure the fairness of the execution.&#x20;

Counterparties to a trade can be regular users, professional market makers, or, when a user's order is too large and lacks sufficient liquidity, it can be fulfilled by an MEV (Maximal Extractable Value) bot within the liquidity pool of an AMM.


---

# 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:

```
GET https://docs.jayx.com/jayx-docs-n8rfmgwto77q5ila/solutions/dapp/exchange-nodes/order-book.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.
