Module hyperliquid::utils

source ·

Functions

  • Parse price to the accepted number of decimals Prices can have up to 5 significant figures, but no more than 6 decimals places
  • Parse size to the accepted number of decimals. Sizes are rounded to the szDecimals of that asset. For example, if szDecimals = 3 then 1.001 is a valid size but 1.0001 is not You can find the szDecimals for an asset by making a meta request to the info endpoint