Skip to main content

Module precision

Module precision 

Source
Expand description

Hyperliquid’s precision rules for order sizes and prices, and the check an order passes before it is sent.

From Hyperliquid’s tick and lot size rules:

  • A size has at most the asset’s szDecimals decimal places.
  • A price has at most 5 significant figures, and at most MAX_DECIMALS - szDecimals decimal places, where MAX_DECIMALS is 6 for perpetuals and 8 for spot. An integer price is always valid, whatever its number of significant figures.

A spot pair’s szDecimals is its base token’s.

Structs§

OrderPrecision
Hyperliquid’s precision rules for one market’s orders. See the module docs.