> For the complete documentation index, see [llms.txt](https://hyperpnl.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hyperpnl.gitbook.io/docs/architecture/core-backend/order-matching.md).

# Order Matching

Order matching in HYPERPNL is handled by the Core Offchain Engine using live order book data from Hyperliquid.

When a user places an order, it is evaluated against the current market state, including real-time bid and ask levels and available liquidity.

#### <mark style="color:$warning;">**Matching Against Real Liquidity**</mark>

Orders are matched based on the exact depth of the live order book.

Execution conditions come entirely from the external market:

* Real price levels
* Real available liquidity
* Real market timing

The Hyperliquid order book itself is not modified, and no external liquidity is consumed.

#### <mark style="color:$warning;">**Internal Execution**</mark>

Once matching conditions are met, the trade is executed internally within HYPERPNL’s backend.

This allows the system to reflect real market behavior without sending orders to the external venue.\
Both demo and funded traders are evaluated using the same matching logic.

#### <mark style="color:$warning;">**Partial Fills and Slippage**</mark>

If liquidity at a given price level is insufficient, orders may be partially filled.

Slippage is a natural result of order size, order book depth, and market movement.\
There are no artificial fills or hidden adjustments.

#### <mark style="color:$warning;">**Order Behavior**</mark>

The matching engine supports market, limit, take-profit, and stop-loss orders.

All orders are good-till-cancel and reduce-only constraints are enforced where applicable.
