• Format a chain-integer price to a human-readable number.

    Parameters

    • market: Market

      The market definition (provides quote decimals).

    • chainValue: bigint

      The price as a chain integer (bigint).

    Returns number

    The human-readable price as a number.

    const price = formatPrice(market, 25000000000n); // e.g., 25.0