> 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/market-data-sources.md).

# Market Data Sources

All market data used by HYPERPNL comes directly from Hyperliquid.

Prices and order book updates are consumed in real time through Hyperliquid’s WebSocket feeds. This includes best bid and ask prices, order book depth, and mark price updates.

HYPERPNL does not generate prices, smooth data, or introduce synthetic spreads. If the market moves on Hyperliquid, the same movement is reflected immediately in the system.

{% @mermaid/diagram content="graph LR
subgraph HLQ\["Hyperliquid"]
WS\[WebSocket]
end

subgraph MD\["Market Data"]
direction TB
LOB\[Live Order Book]
MP\[Mark Price]
end

subgraph APP\["HyperPNL App"]
direction TB
FE\[Frontend]
BE\[Core Offchain Engine]
end

HLQ --> MD
MD --> APP" %}

#### <mark style="color:$warning;">**Live Order Book Data**</mark>

The Core Offchain Engine continuously listens to Hyperliquid’s live order book.

This order book is used as the single source of truth for evaluating whether orders can be matched, determining available liquidity at each price level, and calculating slippage based on real market depth.

No intermediate pricing layer is used.

#### <mark style="color:$warning;">**Mark Price Usage**</mark>

In addition to the raw order book, the system also consumes the mark price.

The mark price is used for unrealized PnL calculation, equity updates, and risk and drawdown evaluation. Execution decisions are based on the order book, while account state is evaluated using the mark price. These roles are intentionally kept separate.

HYPERPNL does not create internal prices, delay market updates, apply execution adjustments, or modify order book data.

Market data is sourced and applied as-is.

#### <mark style="color:$warning;">**Why This Matters**</mark>

Because all market data is sourced directly from Hyperliquid, demo and funded traders see the same prices, execution reflects real market conditions, and outcomes cannot be influenced by internal pricing logic.

The Core Offchain Engine reacts to the market. It does not control it.
