Skip to content
All library documents

Hyperliquid Order Book Matching and Transaction Ordering

Article Hyperliquid docs

Summary

Hyperliquid maintains an order book for each asset, with orders placed at tick-size price increments and lot-size quantity increments. Matching follows price-time priority. For perpetual assets, order book operations use the clearinghouse, which handles positions and margin checks. Checks occur when a new order is opened and again for resting orders as they match, accounting for oracle price changes after placement.

The document also explains how consensus orders actions within a block: actions that send no GTC or IOC orders come first, then cancels, then actions that send at least one such order. Within each group, the proposer’s order is preserved, and modifications are grouped according to the new order they place. This describes protocol mechanics rather than a trading strategy; it gives no performance evidence or detail about execution costs and market impact.

Key ideas

  • Orders use tick-size price increments and lot-size quantity increments.
  • Matching follows price-time priority.
  • The clearinghouse performs margin checks when orders open and as resting orders match.
  • Block action ordering groups non-order actions, cancels, and order submissions in that sequence.
  • Modifications are sorted based on the new order they place.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.