SqrtPriceMath
@pegasys-fi/v3-sdk / Exports / SqrtPriceMath
Class: SqrtPriceMath
Table of contents
Constructors
Methods
- getAmount0Delta
- getAmount1Delta
- getNextSqrtPriceFromAmount0RoundingUp
- getNextSqrtPriceFromAmount1RoundingDown
- getNextSqrtPriceFromInput
- getNextSqrtPriceFromOutput
Constructors
constructor
• Private
new SqrtPriceMath()
Cannot be constructed.
Defined in
Methods
getAmount0Delta
▸ Static
getAmount0Delta(sqrtRatioAX96
, sqrtRatioBX96
, liquidity
, roundUp
): default
Parameters
Name | Type |
---|---|
sqrtRatioAX96 | default |
sqrtRatioBX96 | default |
liquidity | default |
roundUp | boolean |
Returns
default
Defined in
getAmount1Delta
▸ Static
getAmount1Delta(sqrtRatioAX96
, sqrtRatioBX96
, liquidity
, roundUp
): default
Parameters
Name | Type |
---|---|
sqrtRatioAX96 | default |
sqrtRatioBX96 | default |
liquidity | default |
roundUp | boolean |
Returns
default
Defined in
getNextSqrtPriceFromAmount0RoundingUp
▸ Static
Private
getNextSqrtPriceFromAmount0RoundingUp(sqrtPX96
, liquidity
, amount
, add
): default
Parameters
Name | Type |
---|---|
sqrtPX96 | default |
liquidity | default |
amount | default |
add | boolean |
Returns
default
Defined in
getNextSqrtPriceFromAmount1RoundingDown
▸ Static
Private
getNextSqrtPriceFromAmount1RoundingDown(sqrtPX96
, liquidity
, amount
, add
): default
Parameters
Name | Type |
---|---|
sqrtPX96 | default |
liquidity | default |
amount | default |
add | boolean |
Returns
default
Defined in
getNextSqrtPriceFromInput
▸ Static
getNextSqrtPriceFromInput(sqrtPX96
, liquidity
, amountIn
, zeroForOne
): default
Parameters
Name | Type |
---|---|
sqrtPX96 | default |
liquidity | default |
amountIn | default |
zeroForOne | boolean |
Returns
default
Defined in
getNextSqrtPriceFromOutput
▸ Static
getNextSqrtPriceFromOutput(sqrtPX96
, liquidity
, amountOut
, zeroForOne
): default
Parameters
Name | Type |
---|---|
sqrtPX96 | default |
liquidity | default |
amountOut | default |
zeroForOne | boolean |
Returns
default