Sources#
One public Hyperliquid info call returns, for every market, three prices and the current funding rate. The desk reads all of it once and caches it for a few seconds.
| Input | What it is |
|---|---|
| Mark | The venue’s own mark price for the perpetual. |
| Mid | The middle of the order book at that moment. |
| Oracle | The external index price the venue uses for funding and liquidation. |
| Funding | The venue’s published hourly funding rate. |
| Candles | One-minute bars, used only for the high and low since the last check. |
The guarded mark#
- Take the median of mark, mid and oracle. One odd value cannot move the median.
- Clamp the result to the oracle ±200 bps. The band is 2%.
- Record whether the clamp changed it. Clamped marks are labelled in the status response.
- If the data is older than 15 seconds, or any input is missing or not positive, the mark is marked unusable.
guarded = clamp( median(mark, mid, oracle), oracle × 0.98, oracle × 1.02 )
usable = every input is a positive number and age ≤ 15 s| Parameter | Value |
|---|---|
| Deviation band | ±200 bps around the oracle |
| Staleness limit | 15 seconds |
| Cache lifetime | A few seconds, shared across accounts |
What it drives#
- The price of paper market and marketable orders.
- Unrealized result, equity and available margin.
- The check for stops, targets, resting orders and liquidation, together with the one-minute extremes.
- Funding payments, which use the guarded mark as the notional price.
When data is missing#
The engine fails closed. With no usable price it refuses new orders and changes nothing. A stale price also stops stops, targets, limits and liquidations from firing, so an old number cannot trigger an event.
Limits of the model#
- The desk does not run its own oracle. It trusts Hyperliquid’s oracle and checks it against two other venue prices.
- Paper fills at the mark have no spread or impact. Real orders pay both.
- The live path prices an order from the venue mark and caps the move with your slippage limit. It does not use the guarded mark.