Skip to main content

SqrtPriceMath

@pegasys-fi/v3-sdk / Exports / SqrtPriceMath

Class: SqrtPriceMath

Table of contents

Constructors

Methods

Constructors

constructor

Private new SqrtPriceMath()

Cannot be constructed.

Defined in

utils/sqrtPriceMath.ts:23

Methods

getAmount0Delta

Static getAmount0Delta(sqrtRatioAX96, sqrtRatioBX96, liquidity, roundUp): default

Parameters

NameType
sqrtRatioAX96default
sqrtRatioBX96default
liquiditydefault
roundUpboolean

Returns

default

Defined in

utils/sqrtPriceMath.ts:25


getAmount1Delta

Static getAmount1Delta(sqrtRatioAX96, sqrtRatioBX96, liquidity, roundUp): default

Parameters

NameType
sqrtRatioAX96default
sqrtRatioBX96default
liquiditydefault
roundUpboolean

Returns

default

Defined in

utils/sqrtPriceMath.ts:38


getNextSqrtPriceFromAmount0RoundingUp

Static Private getNextSqrtPriceFromAmount0RoundingUp(sqrtPX96, liquidity, amount, add): default

Parameters

NameType
sqrtPX96default
liquiditydefault
amountdefault
addboolean

Returns

default

Defined in

utils/sqrtPriceMath.ts:71


getNextSqrtPriceFromAmount1RoundingDown

Static Private getNextSqrtPriceFromAmount1RoundingDown(sqrtPX96, liquidity, amount, add): default

Parameters

NameType
sqrtPX96default
liquiditydefault
amountdefault
addboolean

Returns

default

Defined in

utils/sqrtPriceMath.ts:100


getNextSqrtPriceFromInput

Static getNextSqrtPriceFromInput(sqrtPX96, liquidity, amountIn, zeroForOne): default

Parameters

NameType
sqrtPX96default
liquiditydefault
amountIndefault
zeroForOneboolean

Returns

default

Defined in

utils/sqrtPriceMath.ts:48


getNextSqrtPriceFromOutput

Static getNextSqrtPriceFromOutput(sqrtPX96, liquidity, amountOut, zeroForOne): default

Parameters

NameType
sqrtPX96default
liquiditydefault
amountOutdefault
zeroForOneboolean

Returns

default

Defined in

utils/sqrtPriceMath.ts:57