Preparing search index...
The search index is not available
some.sdk.js
some.sdk.js
TickMath
Class TickMath
Hierarchy
TickMath
Index
Constructors
constructor
Properties
INVALID_
TICK
MAX_
TICK
MAX_
TICK_
VALUE
MIN_
TICK
MIN_
TICK_
VALUE
Methods
get
Base
Tick
Range
get
Formatted
Price
By
Tick
get
Nearest
Highest
Tick
get
Nearest
Lowest
Tick
get
Nearest
Price
By
Input
get
Nearest
Prices
By
Full
Tick
get
Nearest
Tick
By
Price
get
Price
By
Sqrt
Price
get
Price
By
Tick
get
Sqrt
Price
By
Price
is
Highest
Tick
is
Lowest
Tick
nearest
Usable
Tick
Constructors
constructor
new
Tick
Math
(
)
:
TickMath
Returns
TickMath
Properties
Static
INVALID_
TICK
INVALID_
TICK
:
number
= -99999999
Static
MAX_
TICK
MAX_
TICK
:
number
= -TickMath.MIN_TICK
Static
MAX_
TICK_
VALUE
MAX_
TICK_
VALUE
:
string
= "∞"
Static
MIN_
TICK
MIN_
TICK
:
number
= -887272
Static
MIN_
TICK_
VALUE
MIN_
TICK_
VALUE
:
string
= "0"
Methods
Static
get
Base
Tick
Range
get
Base
Tick
Range
(
fromToken
:
IToken
, toToken
:
IToken
, fee
:
Fee_Amount
, leftRange
:
string
, rightRange
:
string
)
:
{
tickLower
:
number
;
tickUpper
:
number
}
Parameters
fromToken:
IToken
toToken:
IToken
fee:
Fee_Amount
leftRange:
string
rightRange:
string
Returns
{
tickLower
:
number
;
tickUpper
:
number
}
tick
Lower
:
number
tick
Upper
:
number
Static
get
Formatted
Price
By
Tick
get
Formatted
Price
By
Tick
(
tick
:
Value
, fee
:
Fee_Amount
)
:
string
Parameters
tick:
Value
fee:
Fee_Amount
Returns
string
Static
get
Nearest
Highest
Tick
get
Nearest
Highest
Tick
(
fee
:
Fee_Amount
)
:
number
Parameters
fee:
Fee_Amount
Returns
number
Static
get
Nearest
Lowest
Tick
get
Nearest
Lowest
Tick
(
fee
:
Fee_Amount
)
:
number
Parameters
fee:
Fee_Amount
Returns
number
Static
get
Nearest
Price
By
Input
get
Nearest
Price
By
Input
(
feeAmount
:
Fee_Amount
, price
:
string
)
:
string
Parameters
feeAmount:
Fee_Amount
price:
string
Returns
string
Static
get
Nearest
Prices
By
Full
Tick
get
Nearest
Prices
By
Full
Tick
(
fee
:
Fee_Amount
)
:
{
highestPrice
:
string
;
lowestPrice
:
string
}
Parameters
fee:
Fee_Amount
Returns
{
highestPrice
:
string
;
lowestPrice
:
string
}
highest
Price
:
string
lowest
Price
:
string
Static
get
Nearest
Tick
By
Price
get
Nearest
Tick
By
Price
(
feeAmount
:
Fee_Amount
, value
:
string
)
:
number
Compute nearest tick of price for input
Parameters
feeAmount:
Fee_Amount
value:
string
Returns
number
Static
get
Price
By
Sqrt
Price
get
Price
By
Sqrt
Price
(
sqrtPrice
:
string
)
:
string
Parameters
sqrtPrice:
string
Returns
string
Static
get
Price
By
Tick
get
Price
By
Tick
(
tick
:
Value
)
:
string
Parameters
tick:
Value
Returns
string
Static
get
Sqrt
Price
By
Price
get
Sqrt
Price
By
Price
(
price
:
string
)
:
string
Parameters
price:
string
Returns
string
Static
is
Highest
Tick
is
Highest
Tick
(
tick
:
Value
, fee
:
Fee_Amount
)
:
boolean
Parameters
tick:
Value
fee:
Fee_Amount
Returns
boolean
Static
is
Lowest
Tick
is
Lowest
Tick
(
tick
:
Value
, fee
:
Fee_Amount
)
:
boolean
Parameters
tick:
Value
fee:
Fee_Amount
Returns
boolean
Static
nearest
Usable
Tick
nearest
Usable
Tick
(
tick
:
number
, tickSpacing
:
number
)
:
number
Parameters
tick:
number
tickSpacing:
number
Returns
number
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
Modules
some.sdk.js
Msg
Collect
Msg
Collect
Reward
Msg
Create
Pool
Msg
Create
Position
Msg
Decrease
Liquidity
Msg
Increase
Liquidity
Msg
Swap
Exact
In
Msg
Swap
Exact
Out
Tick
Math
constructor
INVALID_
TICK
MAX_
TICK
MAX_
TICK_
VALUE
MIN_
TICK
MIN_
TICK_
VALUE
get
Base
Tick
Range
get
Formatted
Price
By
Tick
get
Nearest
Highest
Tick
get
Nearest
Lowest
Tick
get
Nearest
Price
By
Input
get
Nearest
Prices
By
Full
Tick
get
Nearest
Tick
By
Price
get
Price
By
Sqrt
Price
get
Price
By
Tick
get
Sqrt
Price
By
Price
is
Highest
Tick
is
Lowest
Tick
nearest
Usable
Tick
Compute nearest tick of price for input