Utility to invert the price Pb/Pa to Pa/Pb NOTE: precision is lost in this conversion
Pb / Pa
Decimals of original token A (i.e. token A in the given Pb / Pa price)
Decimals of original token B (i.e. token B in the given Pb / Pa price)
inverted price, i.e. Pa / Pb
Utility to invert the sqrtPriceX64 from X64 repr. of sqrt(Pb/Pa) to X64 repr. of sqrt(Pa/Pb) NOTE: precision is lost in this conversion
X64 representation of sqrt(Pb / Pa)
inverted sqrtPriceX64, i.e. X64 representation of sqrt(Pa / Pb)
Generated using TypeDoc
A collection of utility functions to convert between price, tickIndex and sqrtPrice.