Skip to main content
getBaseBinPrice(binStep), getBinPrice(baseBinPrice, binId), and getBinPriceFromStep(binStep, binId) are direct bigint ports of the on-chain Q64.64 price math. They’re useful for computing a bin’s price without an RPC round trip — e.g. when picking lowerBinId/upperBinId for a new position before it exists on-chain. getBinPrice/ getBinPriceFromStep return undefined if binId is outside the representable range for that binStep:
See Bins and pricing for the underlying formula and why every bin’s price is fully deterministic from bin_step and bin_id alone.