Position
A position NFT represents a single range of liquidity provided in a pool. It follows the TON NFT standard.
Interface
get_position_data
get_position_dataReturns position data.
Arguments
None
Returns
slice
User address
slice
Pool address
int
Position index
int
Lower tick of the position's liquidity range
int
Upper tick of the position's liquidity range
int
Liquidity amount of the position
int
Pool's transaction count at last interaction
int
Fee growth for token0 inside range X128
int
Fee growth for token1 inside range X128
int
Whether position is staked in a farm
get_nft_data
get_nft_dataReturns position NFT metadata.
Arguments
None
Returns
int
Is initialized
int
Position index
slice
Pool address
slice
User address
cell
NFT content
get_position_farm_data
get_position_farm_dataReturns all staking data for the position.
Arguments
None
Returns
dict
All position data
Staking Data Format
Uint32
Farm index
Cell
Tick data
Tick Data Contents
Uint256
Seconds per liquidity growth inside X128
Messages
Mint Position
Opcode: 0x80b587dcUint32
Opcode
Uint64
Query ID
Address
Owner address
^Cell
NFT content
^Cell
Position data
โ Int32
Low tick
โ Int32
High tick
โ ^Cell
Position fee data
โโ Uint256
Fee0 growth inside last
โโ Uint256
Fee1 growth inside last
โ Uint128
Liquidity
โ Uint256
Tx count
โ ^Cell
Farm data
โโ Uint1
Should stake
โโ Maybe Uint32
Farm index
Burn Liquidity
Opcode: 0x55521d04Uint32
Opcode
Uint64
Query ID
Int32
Low tick
Int32
Upper tick
Uint128
Liquidity
Uint256
Tx count
^Cell
Fee data
โ Uint256
Fee0 growth inside
โ Uint256
Fee1 growth inside
Address
User address
Stake Liquidity
Opcode: 0x1514f51dUint32
Opcode
Uint64
Query ID
Int32
Low tick
Int32
High tick
Uint128
Liquidity
Uint256
Tx count
Uint256
Seconds per liquidity growth X128
Uint32
Farm index
^Cell
Farm data
โ Uint64
Farm rewards start timestamp
โ Uint64
Farm rewards end timestamp
โ Address
User address
Unstake Liquidity
Opcode: 0x260476e7Uint32
Opcode
Uint64
Query ID
Uint32
Farm index
Uint1
Should restake
Transfer NFT
Opcode: 0x5fcc3d14Uint32
Opcode
Uint64
Query ID
Address
New owner address
Address
Response address
Maybe ^Cell
Custom payload
Coins
Forward amount
Either Cell ^Cell
Forward payload