Skip to main content
Send order prices and sizes as decimal strings, without scientific notation.

Hyperliquid

Non-integer prices allow at most five significant figures and MAX_DECIMALS - szDecimals decimal places. MAX_DECIMALS is 6 for perpetuals, including HIP-3, and 8 for spot. Integer prices such as "123456" are allowed regardless of significant figures. Trigger prices follow the same limits. Sizes allow at most szDecimals decimal places. With szDecimals = 3, the lot size is 0.001: "1.001" is valid; "1.0001" is not. Read szDecimals from perpMeta at perpMarkets[assetId].marketConfig.szDecimals for perpetuals, including HIP-3. For spot, use the base token’s spotMeta entry at assets[spotPairs[pairId].tokens[0]].szDecimals. Hyperliquid predictions use whole-share sizes (szDecimals = 0) and the spot price limits. Spot and prediction orders, and perpetual orders that open or increase a position, must also be worth at least 10 USD, measured as size × limit price. See Place order for the exceptions.

Price examples

  • Perpetual, szDecimals = 3: "1234.5" fits; "1234.56" exceeds five significant figures.
  • Perpetual, szDecimals = 1: "0.01234" fits; "0.012345" exceeds five decimal places.
  • Spot, szDecimals = 2: "0.000123" fits; "0.0001234" exceeds six decimal places.

Polymarket

Prices are quoted in pUSD per share, and order sizes are measured in shares. Get the market’s price step (tick_size) and minimum order size (min_order_size) from Polymarket’s book endpoint, using the selected outcome side’s tokenId from predictionMeta. For tick_size = "0.01", valid prices are "0.01", "0.02", and so on up to "0.99" pUSD per share. "0.521" is invalid because it falls between price steps. The lowest price is one tick above zero; the highest is one tick below 1 pUSD. Prices can have at most eight decimal places. Order sizes normally allow up to two decimal places and must meet min_order_size. If selling small balances is enabled (minimumCloseEnabled: true), you can sell all your shares in an outcome below min_order_size, using up to six decimal places. The market must be open, all shares must be available to sell, and the order must allow an immediate match. For ordinary venue orders, price × size must fit six decimal places. Immediate buys (FrontendMarket, Ioc, Fak, or Fok) also require at least 1 pUSD in whole cents.