@swapx-lib/v3-sdk / Exports / Position
Class: Position
Represents a position on a SwapX V3 Pool
Table of contents
Constructors
Properties
Accessors
Methods
- burnAmountsWithSlippage
- mintAmountsWithSlippage
- ratiosAfterSlippage
- fromAmount0
- fromAmount1
- fromAmounts
Constructors
constructor
• new Position(__namedParameters)
Constructs a position for a given pool with the given liquidity
Parameters
| Name | Type |
|---|---|
__namedParameters | PositionConstructorArgs |
Defined in
entities/position.ts:40
Properties
_mintAmounts
• Private _mintAmounts: null | Readonly<{ amount0: default ; amount1: default \}> = null
Defined in
entities/position.ts:31
_token0Amount
• Private _token0Amount: null | CurrencyAmount<Token> = null
Defined in
entities/position.ts:29
_token1Amount
• Private _token1Amount: null | CurrencyAmount<Token> = null
Defined in
entities/position.ts:30
liquidity
• Readonly liquidity: default
Defined in
entities/position.ts:26
pool
• Readonly pool: Pool
Defined in
entities/position.ts:23
tickLower
• Readonly tickLower: number
Defined in
entities/position.ts:24
tickUpper
• Readonly tickUpper: number
Defined in
entities/position.ts:25
Accessors
amount0
• get amount0(): CurrencyAmount<Token>
Returns the amount of token0 that this position's liquidity could be burned for at the current pool price
Returns
CurrencyAmount<Token>
Defined in
entities/position.ts:68
amount1
• get amount1(): CurrencyAmount<Token>
Returns the amount of token1 that this position's liquidity could be burned for at the current pool price
Returns
CurrencyAmount<Token>
Defined in
entities/position.ts:100
mintAmounts
• get mintAmounts(): Readonly<{ amount0: default ; amount1: default \}>
Returns the minimum amounts that must be sent in order to mint the amount of liquidity held by the position at the current price for the pool
Returns
Readonly<{ amount0: default ; amount1: default \}>
Defined in
entities/position.ts:258
token0PriceLower
• get token0PriceLower(): Price<Token, Token>
Returns the price of token0 at the lower tick
Returns
Price<Token, Token>